Advisory

GHSA-pjx8-984p-7p3x

Also known as: None

Summary

FOSUserBundle Entropy is lost in the TokenGenerator

Details

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\-]+.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-05-15 21:42 UTC
Modified
2024-11-29 05:41 UTC

Affected packages and fixes

friendsofsymfony/user-bundle

Packagist · All systems

Affected

  • introduced 1.0.0, fixed 1.3.5 (ecosystem)

Fixed versions

1.3.5

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences