Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1wang4LTk4NHAtN3AzeM4AA8IW
FOSUserBundle Entropy is lost in the TokenGenerator
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-]+.
Permalink: https://github.com/advisories/GHSA-pjx8-984p-7p3xJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wang4LTk4NHAtN3AzeM4AA8IW
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 7 months ago
Updated: 7 months ago
Identifiers: GHSA-pjx8-984p-7p3x
References:
- https://github.com/FriendsOfSymfony/FOSUserBundle/commit/b3ebfea52065e9727508f5f8e6c9f7459a1b06d8
- https://github.com/FriendsOfPHP/security-advisories/blob/master/friendsofsymfony/user-bundle/2014-09-04-1.yaml
- https://symfony.com/blog/fosuserbundle-entropy-of-generated-tokens-is-lost
- https://github.com/advisories/GHSA-pjx8-984p-7p3x
Blast Radius: 0.0
Affected Packages
packagist:friendsofsymfony/user-bundle
Dependent packages: 431Dependent repositories: 6,959
Downloads: 32,099,431 total
Affected Version Ranges: >= 1.0.0, < 1.3.5
Fixed in: 1.3.5
All affected versions: 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4
All unaffected versions: 1.3.5, 1.3.6, 1.3.7, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.2.0, 3.2.1, 3.3.0, 3.4.0, 4.0.0