FOSUserBundle TokenGenerator Entropy Loss

friendsofsymfony/user-bundle Updated 02 Oct 2025

Summary

15/05/2024
MODERATE
Yes i
Moderate
Not published

GHSA-pjx8-984p-7p3x: FOSUserBundle Entropy is lost in the TokenGenerator. Affects friendsofsymfony/user-bundle versions >= 1.0.0, < 1.3.5. Fixed in 1.3.5. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

FOSUserBundle is a popular user management bundle for Symfony applications. It provides functionality for user registration, login, and password management. The TokenGenerator component is responsible for generating tokens used for email confirmation and password resetting. However, due to the usage of base_convert, the generated tokens lose entropy and are not cryptographically safe.

Vulnerability Detail

The vulnerability in FOSUserBundle's TokenGenerator arises from the imprecise nature of base_convert for large inputs. This results in the loss of entropy in the generated tokens, making them less random and potentially vulnerable to brute-force attacks. Attackers may be able to guess or predict these tokens, compromising the security of email confirmation and password resetting processes.

How To Fix

Minimum fixed version

1.3.5

This is the first release that contains the fix.

composer require friendsofsymfony/user-bundle:1.3.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended solution is to apply the fix provided in the 'how_to_fix' section.

Conclusion

The FOSUserBundle TokenGenerator vulnerability can lead to compromised security in email confirmation and password resetting processes. It is crucial to apply the recommended fix and update affected routes to ensure the generation of cryptographically safe tokens. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for friendsofsymfony/user-bundle →

Share this vulnerability

FAQ

FOSUserBundle is a user management bundle for Symfony applications, providing features like user registration, login, and password management.

The TokenGenerator component in FOSUserBundle is responsible for generating tokens used for email confirmation and password resetting.

The entropy of tokens determines their randomness and security. Higher entropy means it is harder for attackers to guess or predict the tokens.

The loss of entropy in the generated tokens makes them more susceptible to brute-force attacks. Attackers may be able to guess or predict these tokens, compromising the security of email confirmation and password resetting processes.

To fix this vulnerability, you should update your FOSUserBundle to the latest version that includes the token generation fix. Additionally, make sure any route placeholders expected to match the generated tokens allow dashes as well.

Related vulnerabilities

Recent vulnerabilities recorded for friendsofsymfony/user-bundle.

How To Fix

Minimum fixed version

1.3.5

This is the first release that contains the fix.

composer require friendsofsymfony/user-bundle:1.3.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback