Skip to content

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

Moderate severity GitHub Reviewed Published May 30, 2024 to the GitHub Advisory Database • Updated May 30, 2024

Package

composer symfony/symfony (Composer)

Affected versions

>= 2.0.0, < 2.0.6

Patched versions

2.0.6

Description

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: symfony/symfony@9d2ab9ca9c1762

References

Published to the GitHub Advisory Database May 30, 2024
Reviewed May 30, 2024
Last updated May 30, 2024

Severity

Moderate
6.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-7mx2-7q8p-pgmw

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.