6.5medium
Cookie persistence in Symfony
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.32% (higher than 71% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-qw36-p97w-vcqrBIT-SYMFONY-2021-41268
Description
Symfony/SecurityBundle is the security system for Symfony, a PHP framework for web and console applications and a set of reusable PHP components. Since the rework of the Remember me cookie in version 5.3.0, the cookie is not invalidated when the user changes their 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. Starting with version 5.3.12, Symfony makes the password part of the signature by default. In that way, when the password changes, then the cookie is not valid anymore.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| symfony symfony | >= 5.3.0, < 5.3.12 | CVE List |
| symfony/security-bundle (Packagist) | from 5.3.0 before 5.3.12 | GitHub Advisory Database |
| symfony/symfony (Packagist) | from 5.3.0 before 5.3.12 | GitHub Advisory Database |
| sensiolabs symfony | from 5.3.0 before 5.3.12 | NVD |
| symfony (Bitnami) | from 5.3.0 before 5.3.12 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.5medium CVSS:2.0 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
| Bitnami Vulnerability Database | high rating |
Classification
What each source says
CVE List
Symfony/SecurityBundle is the security system for Symfony, a PHP framework for web and console applications and a set of reusable PHP components. Since the rework of the Remember me cookie in version 5.3.0, the cookie is not invalidated when the user changes their 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. Starting with version 5.3.12, Symfony makes the password part of the signature by default. In that way, when the password changes, then the cookie is not valid anymore.
GitHub Advisory Database
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.
NVD (es)
Symfony/SecurityBundle es el sistema de seguridad de Symfony, un framework PHP para aplicaciones web y de consola y un conjunto de componentes PHP reusables. Desde la revisión de la cookie Remember me en la versión 5.3.0, la cookie no es invalidada cuando el usuario cambia su contraseña. Por lo tanto, los atacantes pueden mantener su acceso a la cuenta aunque se cambie la contraseña, siempre y cuando hayan tenido la oportunidad de iniciar sesión una vez y conseguir una cookie remember me válida. A partir de la versión 5.3.12, Symfony hace que la contraseña sea parte de la firma por defecto. De esta forma, cuando la contraseña cambia, la cookie deja de ser válida
References
| https://github.com/symfony/symfony/security/advisories/GHSA-qw36-p97w-vcqr | patch, third-party-advisory, web | |
| https://github.com/symfony/symfony/pull/44243 | patch, third-party-advisory, web | |
| https://github.com/symfony/symfony/commit/36a808b857cd3240244f4b224452fb1e70dc6dfc | patch, third-party-advisory, web | |
| https://github.com/symfony/symfony/releases/tag/v5.3.12 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-41268 | advisory | |
| https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-bundle/CVE-2021-41268.yaml | web | |
| https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2021-41268.yaml | web | |
| https://github.com/symfony/symfony | package | |
| https://symfony.com/cve-2021-41268 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-41268 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qw36-p97w-vcqr changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-41268 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-SYMFONY-2021-41268 changed 2024-03-06 | Apache-2.0 |