Lucene search

K
githubGitHub Advisory DatabaseGHSA-PJX8-984P-7P3X
HistoryMay 15, 2024 - 9:42 p.m.

FOSUserBundle Entropy is lost in the TokenGenerator

2024-05-1521:42:25
CWE-331
GitHub Advisory Database
github.com
3
fosuserbundle
entropy
tokengenerator
token
generation
cryptographically
safe
resolution
range
characters
regexes
backported
email confirmation
password resetting

7.2 High

AI Score

Confidence

Low

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

Affected configurations

Vulners
Node
friendsofsymfonyuser-bundleRange<1.3.5
CPENameOperatorVersion
friendsofsymfony/user-bundlelt1.3.5

7.2 High

AI Score

Confidence

Low