GHSA-PJX8-984P-7P3X
Vulnerability from github – Published: 2024-05-15 21:42 – Updated: 2024-05-15 21:42
VLAI
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-]+.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "friendsofsymfony/user-bundle"
},
"ranges": [
{
"events": [
{
"introduced": "1.0.0"
},
{
"fixed": "1.3.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-331"
],
"github_reviewed": true,
"github_reviewed_at": "2024-05-15T21:42:25Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"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\\-]+.",
"id": "GHSA-pjx8-984p-7p3x",
"modified": "2024-05-15T21:42:25Z",
"published": "2024-05-15T21:42:25Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "FOSUserBundle Entropy is lost in the TokenGenerator"
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…