GHSA-pjx8-984p-7p3x FOSUserBundle Entropy is lost in the TokenGenerator

Not scored Published

Weak token generation in FOSUserBundle allows attackers to predict email confirmation and password reset tokens, potentially leading to account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-pjx8-984p-7p3x?

GHSA-pjx8-984p-7p3x is a 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

Description

Because of the usage of base_convert which looses precision for large inputs, the entropy of tokens generated by FOSUserBundle for the email confirmation and password resetting is lost. This makes these tokens much less random than they are expected to be, and so not cryptographically safe.

Resolution

The token generation logic used in the 2.0.x branch based on base64 encoding has been backported. This changes the range of characters used in the token. Any route placeholder expected to match a token generated by FOSUserBundle must be updated to allow dashes, which are not allowed by \w in regexes. A \w+ requirement should so become [\w-]+.

Which versions are affected by GHSA-pjx8-984p-7p3x?

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

PackageAffectedFixed in
friendsofsymfony/user-bundle PackagistFrom 1.0.01.3.5
friendsofsymfony/user-bundle PackagistFrom 1.0.01.3.5

How do I fix GHSA-pjx8-984p-7p3x?

Upgrade friendsofsymfony/user-bundle to 1.3.5 or later.

Is GHSA-pjx8-984p-7p3x being exploited?

There is no known exploitation of GHSA-pjx8-984p-7p3x in the wild and no public exploit code.

Sources

Is GHSA-pjx8-984p-7p3x in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free