CVE-2021-41268
JSON

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 packageVersionsReported by
symfony symfony>= 5.3.0, < 5.3.12CVE List
symfony/security-bundle (Packagist)from 5.3.0 before 5.3.12GitHub Advisory Database
symfony/symfony (Packagist)from 5.3.0 before 5.3.12GitHub Advisory Database
sensiolabs symfonyfrom 5.3.0 before 5.3.12NVD
symfony (Bitnami)from 5.3.0 before 5.3.12Bitnami Vulnerability Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.5medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:P/A:P
Bitnami Vulnerability Databasehigh 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

Sources

SourceRecordLicence
CVE ListCVE-2021-41268 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-qw36-p97w-vcqr changed 2026-07-08CC-BY-4.0
NVDCVE-2021-41268 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-SYMFONY-2021-41268 changed 2024-03-06Apache-2.0