# GHSA-qm5v-pj64-852j: Passbolt Api Tabnabbing when opening URI with menu "Open URI in a new tab"

> An attacker can share a malicious URI that, when opened in a new tab, allows the malicious page to manipulate the original window, potentially leading to phishing or data integrity issues.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 May 2024

## What is GHSA-qm5v-pj64-852j?

GHSA-qm5v-pj64-852j is a vulnerability in passbolt/passbolt_api, published on 20 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

### Description
A user could create and share a resource with a malicious URI. When the victim opens with menu “Open URI in a new tab” function, the malicious page has access to the window.opener object.

### Impact of issue
The newly opened malicious page can for example change the window.opener.location to redirect the user to a phishing page, or call a JavaScript function served by the AppJS on the user behalf for example to try to affect the integrity of the data.

### Fix
The code that opens a new window via window.open(); now open the tab with the noopener attribute.

## Which versions are affected by GHSA-qm5v-pj64-852j?

2 open source packages ship an affected version, including passbolt/passbolt_api.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `passbolt/passbolt_api` | Packagist | All versions | 2.11.0 |
| `passbolt/passbolt_api` | Packagist | All versions | 2.11.0 |

## How do I fix GHSA-qm5v-pj64-852j?

Upgrade passbolt/passbolt_api to 2.11.0 or later.

## Is GHSA-qm5v-pj64-852j being exploited?

There is no known exploitation of GHSA-qm5v-pj64-852j in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qm5v-pj64-852j and fix it if it is affected.

What it is: GHSA-qm5v-pj64-852j is a vulnerability in passbolt/passbolt_api, published on 20 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-qm5v-pj64-852j in the wild and no public exploit code.

Affected packages and fixed versions:
- passbolt/passbolt_api (Packagist): affected all versions; fixed in 2.11.0
- passbolt/passbolt_api (Packagist): affected all versions; fixed in 2.11.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-qm5v-pj64-852j/ (Markdown: https://insights.sbomify.com/GHSA-qm5v-pj64-852j/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qm5v-pj64-852j

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qm5v-pj64-852j/
Summaries are generated and may contain mistakes; the official description above is the record.
