Symfony storing cookie headers in HttpCache
Published 1 Feb 2023 · Updated 13 Feb 2025
Is your project on an affected symfony/http-kernel?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=2.0.0 <4.4.50
- Fixed in
- 4.4.50
composer require symfony/http-kernel:^4.4.50- Affected
- >=5.0.0 <5.4.20
- Fixed in
- 5.4.20
composer require symfony/http-kernel:^5.4.20- Affected
- >=6.0.0 <6.0.20
- Fixed in
- 6.0.20
composer require symfony/http-kernel:^6.0.20- Affected
- >=6.1.0 <6.1.12
- Fixed in
- 6.1.12
composer require symfony/http-kernel:^6.1.12- Affected
- >=6.2.0 <6.2.6
- Fixed in
- 6.2.6
composer require symfony/http-kernel:^6.2.6- Affected
- >=2.0.0 <4.4.50
- Fixed in
- 4.4.50
composer require symfony/symfony:^4.4.50- Affected
- >=5.0.0 <5.4.20
- Fixed in
- 5.4.20
composer require symfony/symfony:^5.4.20- Affected
- >=6.0.0 <6.0.20
- Fixed in
- 6.0.20
composer require symfony/symfony:^6.0.20- Affected
- >=6.1.0 <6.1.12
- Fixed in
- 6.1.12
composer require symfony/symfony:^6.1.12- Affected
- >=6.2.0 <6.2.6
- Fixed in
- 6.2.6
composer require symfony/symfony:^6.2.6Details
Description -----------
The Symfony HTTP cache system acts as a reverse proxy: it caches HTTP responses (including headers) and returns them to clients.
In a recent AbstractSessionListener change, the response might now contain a Set-Cookie header. If the Symfony HTTP cache system is enabled, this header might be stored and returned to some other clients. An attacker can use this vulnerability to retrieve the victim's session.
Resolution ----------
The HttpStore constructor now takes a parameter containing a list of private headers that are removed from the HTTP response headers.
The default value for this parameter is Set-Cookie, but it can be overridden or extended by the application.
The patch for this issue is available here for branch 4.4.
Credits -------
We would like to thank Soner Sayakci for reporting the issue and Nicolas Grekas for fixing it.
Is GHSA-h7vf-5wrv-9fhv in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/http-kernel, and gives you the command that fixes it.
More advisories for symfony/http-kernel
- HighCVE-2026-45075Symfony's HEAD Request Bypasses methods: ['GET'] Filter in #[IsGranted] / #[IsSignatureValid] / #[IsCsrfTokenValid] · 27 May 2026
- HighCVE-2014-5245Symfony allows direct access of ESI URLs behind a trusted proxy · 30 May 2024
- MediumCVE-2015-2308Symfony Vulnerable to PHP Eval Injection · 17 May 2022
- MediumCVE-2015-4050Symfony Incorrect Access Control · 17 May 2022
- HighCVE-2019-18887Symfony Http-Kernel has non-constant time comparison in UriSigner · 26 Mar 2022
- MediumCVE-2021-41267Webcache Poisoning in symfony/http-kernel · 24 Nov 2021
References
- Linkgithub.com/symfony/symfony/security/advisories/GHSA-h7vf-5wrv-9fhv
- Advisorynvd.nist.gov/vuln/detail/CVE-2022-24894
- Linkgithub.com/symfony/symfony/commit/d2f6322af9444ac5cd1ef3ac6f280dbef7f9d1fb
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-kernel/CVE-2022-24894.yaml
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2022-24894.yaml
- Packagegithub.com/symfony/symfony
- Linklists.debian.org/debian-lts-announce/2023/07/msg00014.html
- Linksymfony.com/cve-2022-24894
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.