CVE-2021-41268 is a high-severity (CVSS 8.8) CWE-384 vulnerability in symfony/security-bundle. A fix is available for symfony/security-bundle — see the affected versions and patch details below.
Cookie persistence after password changes in symfony/security-bundle
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-41268 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
symfony/security-bundle🐘symfony/symfonyReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Description
Since the rework of the Remember me cookie in Symfony 5.3, the cookie is not invalidated anymore when the user changes its password.
Attackers can therefore maintain their access to the account even if the password is changed as long as they have had the chance to login once and get a valid remember me cookie.
Resolution
Symfony now makes the password part of the signature by default. In that way, when the password changes then the cookie is not valid anymore.
The patch for this issue is available here for branch 5.3.
Credits
We would like to thank Thibaut Decherit for reporting the issue and Wouter J for fixing the issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | symfony/security-bundle | ≥ 5.3.0&&< 5.3.12 | 5.3.12composer require symfony/security-bundle:^5.3.12 |
| 🐘Packagist | symfony/symfony | ≥ 5.3.0&&< 5.3.12 | 5.3.12composer require symfony/symfony:^5.3.12 |
Affected Products
symfonysensiolabsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for symfony/security-bundle, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update symfony/security-bundle to 5.3.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-41268 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2021-41268 in your dependencies?
Find it across Packagist, including transitive dependencies.