# FriendsOfSymfony FOSUserBundle improper authorization in user refreshing

Source: https://junglewise.ai/threats/friendsofsymfony-fosuserbundle-improper-authorization-in-user-16f646f7  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-05-15. Updated: 2026-07-16  
License: CC BY 4.0 with a link back

Severity: medium · Published 2024-05-15

FOSUserBundle is a library used by Symfony-based websites to manage user accounts and authentication. A security flaw was identified where the system incorrectly validated user identities when refreshing a session. If a user was allowed to change their username, this flaw could potentially lead to unauthorized access or identity confusion within the application.

Technologies: [friendsofsymfony/user-bundle (Packagist)](https://junglewise.ai/threats/technologies/friendsofsymfony-user-bundle). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, published 15 May 2024.

**Which products and versions are affected?** FriendsOfSymfony UserBundle >= 1.0.0, < 1.2.1; friendsofsymfony/user-bundle (Packagist) >= 1.0.0, < 1.2.1.

**Is there a fix for This vulnerability?** A patch was published on 2012-07-10: Date referenced in security advisory YAML for version 1.2.1 fix Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run FriendsOfSymfony UserBundle or friendsofsymfony/user-bundle (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is classified as Improper Authorization (CWE-285) within the user refreshing logic of FOSUserBundle. In affected versions, the bundle refreshed user sessions using the database primary key rather than the username. This creates a synchronization risk in scenarios where a user is permitted to change their username, potentially allowing a session to persist or be associated with incorrect identity data. The issue was resolved in version 1.2.1 by ensuring the user is loaded using the primary key correctly during the refreshing process to maintain identity integrity.

## Affected products

- friendsofsymfony user-bundle >= 1.0.0, < 1.2.1

## Timeline

- 2024-05-15: advisory: GitHub Advisory published
- 2012-07-10: patched: Date referenced in security advisory YAML for version 1.2.1 fix

## References

- [https://api.github.com/users/RainSignal](https://api.github.com/users/RainSignal)
- [https://github.com/RainSignal](https://github.com/RainSignal)
- [https://api.github.com/users/RainSignal/gists%7B/gist_id%7D](https://api.github.com/users/RainSignal/gists%7B/gist_id%7D)
- [https://api.github.com/users/RainSignal/repos](https://api.github.com/users/RainSignal/repos)
- [https://avatars.githubusercontent.com/u/101503193?v=4](https://avatars.githubusercontent.com/u/101503193?v=4)
- [https://api.github.com/users/RainSignal/events%7B/privacy%7D](https://api.github.com/users/RainSignal/events%7B/privacy%7D)

## Related threats

- [FOSUserBundle Session Hijacking Vulnerability](https://junglewise.ai/threats/fosuserbundle-session-hijacking-vulnerability-3ca3b4a6)
- [FOSUserBundle Entropy is lost in the TokenGenerator](https://junglewise.ai/threats/fosuserbundle-entropy-is-lost-in-the-tokengenerator-65f86618)
- [FriendsOfSymfony FOSUserBundle denial of service via login form](https://junglewise.ai/threats/cve-2013-5750-friendsofsymfony-fosuserbundle-denial-of-service-via-login-form)
