GHSA-pjx8-984p-7p3x: Friendsofsymfony/user bundle FOSUserBundle Entropy Is Lost Vulnerability
MODERATEGHSA-pjx8-984p-7p3x is a MODERATE fosuserbundle entropy is lost vulnerability (CWE-331: Insufficient Entropy) affecting Friendsofsymfony/user bundle libraries in the Packagist ecosystem. The issue involves fosuserbundle entropy is lost in the tokengenerator. Remediation is available by upgrading affected packages to version 1.3.5.
GHSA-pjx8-984p-7p3x at a Glance
How to Fix GHSA-pjx8-984p-7p3x
To remediate this vulnerability, upgrade all affected Friendsofsymfony/user bundle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade friendsofsymfony/user-bundle to 1.3.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for friendsofsymfony/user-bundle
How to Check if You Are Affected
To determine whether your application is affected by GHSA-pjx8-984p-7p3x, inspect your project dependencies for Friendsofsymfony/user bundle:
inspect dependencies for friendsofsymfony/user-bundle
Analyze the terminal output to locate any version of Friendsofsymfony/user bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-331: Insufficient Entropy, where the product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others. In Friendsofsymfony/user bundle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-pjx8-984p-7p3x Affected Friendsofsymfony/user bundle Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
friendsofsymfony/user-bundle
|
Packagist |
≥ 1.0.0
< 1.3.5
|
1.3.5
|
References
Frequently Asked Questions
What is GHSA-pjx8-984p-7p3x?
Which Friendsofsymfony/user bundle versions are affected?
What version fixes GHSA-pjx8-984p-7p3x?
Is friendsofsymfony/user-bundle affected?
What CWE is associated with GHSA-pjx8-984p-7p3x?
How can I check Packagist dependencies for GHSA-pjx8-984p-7p3x?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pjx8-984p-7p3x",
"modified" : "2024-05-15T21:42:25Z",
"published" : "2024-05-15T21:42:25Z",
"aliases" : [ ],
"summary" : "FOSUserBundle Entropy is lost in the TokenGenerator",
"details" : "### Description\nBecause 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.\n\n### Resolution\nThe 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" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "friendsofsymfony/user-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.3.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FriendsOfSymfony/FOSUserBundle/commit/b3ebfea52065e9727508f5f8e6c9f7459a1b06d8"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/friendsofsymfony/user-bundle/2014-09-04-1.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FriendsOfSymfony/FOSUserBundle"
}, {
"type" : "WEB",
"url" : "https://symfony.com/blog/fosuserbundle-entropy-of-generated-tokens-is-lost"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-331" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T21:42:25Z",
"nvd_published_at" : null
}
}