GHSA-pjx8-984p-7p3x

Suggest an improvement
Source
https://github.com/advisories/GHSA-pjx8-984p-7p3x
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/05/GHSA-pjx8-984p-7p3x/GHSA-pjx8-984p-7p3x.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-pjx8-984p-7p3x
Published
2024-05-15T21:42:25Z
Modified
2024-11-29T05:41:12.279694Z
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-]+.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-331"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-15T21:42:25Z"
}
References

Affected packages

Packagist / friendsofsymfony/user-bundle

Package

Name
friendsofsymfony/user-bundle
Purl
pkg:composer/friendsofsymfony/user-bundle

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.0.0
Fixed
1.3.5

Affected versions

1.*

1.1.0
1.2.0

v1.*

v1.2.1
v1.2.2
v1.2.3
v1.2.4
v1.2.5
v1.3.0
v1.3.1
v1.3.2
v1.3.3
v1.3.4