# GHSA-6mjq-9x4w-m3w9: FOSUserBundle Session Hijacking Vulnerability

> Attackers can hijack user sessions in FOSUserBundle, leading to account takeover; users should upgrade to the latest version.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2024

## What is GHSA-6mjq-9x4w-m3w9?

GHSA-6mjq-9x4w-m3w9 is an authentication bypass vulnerability in friendsofsymfony/user-bundle, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Versions of FOSUserBundle from 1.2.x to 1.2.4 have been found to contain a security vulnerability related to session hijacking. This issue has been addressed in version 1.2.4, and users are strongly advised to upgrade to the latest version to prevent potential session-related security risks.

## Which versions are affected by GHSA-6mjq-9x4w-m3w9?

2 open source packages ship an affected version, including friendsofsymfony/user-bundle.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `friendsofsymfony/user-bundle` | Packagist | From 1.2.0 | 1.2.4 |
| `friendsofsymfony/user-bundle` | Packagist | From 1.2.0 | 1.2.4 |

## How do I fix GHSA-6mjq-9x4w-m3w9?

Upgrade friendsofsymfony/user-bundle to 1.2.4 or later.

## Is GHSA-6mjq-9x4w-m3w9 being exploited?

There is no known exploitation of GHSA-6mjq-9x4w-m3w9 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-6mjq-9x4w-m3w9 and fix it if it is affected.

What it is: GHSA-6mjq-9x4w-m3w9 is an authentication bypass vulnerability in friendsofsymfony/user-bundle, published on 15 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-6mjq-9x4w-m3w9 in the wild and no public exploit code.

Affected packages and fixed versions:
- friendsofsymfony/user-bundle (Packagist): affected from 1.2.0; fixed in 1.2.4
- friendsofsymfony/user-bundle (Packagist): affected from 1.2.0; fixed in 1.2.4

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-6mjq-9x4w-m3w9/ (Markdown: https://insights.sbomify.com/GHSA-6mjq-9x4w-m3w9/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-6mjq-9x4w-m3w9

---
From sbomify Insights: https://insights.sbomify.com/GHSA-6mjq-9x4w-m3w9/
Summaries are generated and may contain mistakes; the official description above is the record.
