MediumGHSA-7mx2-7q8p-pgmw

Symfony may allow a user to switch to using another user's identity

Published 30 May 2024 · Updated 4 Dec 2024

Is your project on an affected symfony/symfony?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
>=2.0.0 <2.0.6
Fixed in
2.0.6
Update to the fixed version for your release line, for example:composer require symfony/symfony:^2.0.6

Details

Symfony 2.0.6 has just been released. It addresses a security vulnerability in the EntityUserProvider as provided in the Doctrine bridge.

If you let your users update their login/username from a form, and if you are using Doctrine as a user provider, then you are vulnerable and you should upgrade as soon as possible.

The issue is that it is possible for a user to switch to another one. Here is how to reproduce it: The current user changes its username via a form to another existing username. When the form is submitted, he will have a validation error (as the username already exists) but the user object in the session will still be modified to the new username. This user from the session will be used for the next requests and so the user will be switched to this other user.

The fix is to always refresh the user via the primary key (which cannot be updated via a form) instead of the username.

If you cannot upgrade immediately, please apply the following patch: https://github.com/symfony/symfony/commit/9d2ab9ca9c1762

Is GHSA-7mx2-7q8p-pgmw in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/symfony, and gives you the command that fixes it.

More advisories for symfony/symfony

  • HighCVE-2026-109413Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process · 27 Oct 2026
  • HighCVE-2026-108082Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header · 27 Oct 2026
  • MediumCVE-2026-48784Symfony: UrlGenerator Dot-Segment Encoding Skips Every Other Chained `../` or `./` → Generated URL Collapses Off-Route Under RFC 3986 Normalization · 15 Jun 2026
  • MediumCVE-2026-48760Symfony: HtmlSanitizer URL Parser Deny Gates Underinclusive: Percent-Encoded BiDi Marks and Unicode Whitespace Bypass Visual-Spoofing Defense · 15 Jun 2026
  • MediumCVE-2026-48747Symfony: Mailomat Mailer Webhook Parser Reads the HMAC Algorithm from the Request: Signature Algorithm Downgrade · 15 Jun 2026
  • MediumCVE-2026-48736Symfony: IpUtils::PRIVATE_SUBNETS Omits IPv6 Transition Forms (6to4, NAT64, Teredo, IPv4-compatible): SSRF Bypass in NoPrivateNetworkHttpClient · 15 Jun 2026
All 102 advisories for symfony/symfony

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.