# GHSA-f5pp-pmq8-gp46: Passbolt Api Retrieval of HTTP-only cookies

> An attacker exploiting an XSS vulnerability can retrieve HTTP-only session cookies via the /auth/verify.json endpoint, potentially accessing sensitive user data.

- **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-f5pp-pmq8-gp46?

GHSA-f5pp-pmq8-gp46 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

Passbolt uses three cookies: a session cookie, a CSRF protection cookie and a cookie to keep track of the multiple-factor authentication process.

Both the session cookie and the mfa cookie are properly set HTTP-only to prevent an attacker from retrieving the content of those cookies if they managed to exploit an XSS.

The /auth/verify.json endpoint returns a JSON that, among other things, contains the cookies sent in the request. (similar to the TRACE HTTP method)

An attacker who manages to leverage an XSS vulnerability could retrieve the session cookies of a legitimate user, effectively granting them the ability to retrieve information (such as encrypted password list or group list) without requiring user interaction.

This vulnerability has a low impact, but no immediate risk due to it requiring the exploitation of an XSS vulnerability that has yet to be found.

## Which versions are affected by GHSA-f5pp-pmq8-gp46?

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


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

## How do I fix GHSA-f5pp-pmq8-gp46?

Upgrade passbolt/passbolt_api to 2.7.0 or later.

## Is GHSA-f5pp-pmq8-gp46 being exploited?

There is no known exploitation of GHSA-f5pp-pmq8-gp46 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-f5pp-pmq8-gp46 and fix it if it is affected.

What it is: GHSA-f5pp-pmq8-gp46 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-f5pp-pmq8-gp46 in the wild and no public exploit code.

Affected packages and fixed versions:
- passbolt/passbolt_api (Packagist): affected all versions; fixed in 2.7.0
- passbolt/passbolt_api (Packagist): affected all versions; fixed in 2.7.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-f5pp-pmq8-gp46/ (Markdown: https://insights.sbomify.com/GHSA-f5pp-pmq8-gp46/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-f5pp-pmq8-gp46

---
From sbomify Insights: https://insights.sbomify.com/GHSA-f5pp-pmq8-gp46/
Summaries are generated and may contain mistakes; the official description above is the record.
