MediumGHSA-h7vf-5wrv-9fhvBIT-symfony-2022-24894CVE-2022-24894

Symfony storing cookie headers in HttpCache

Published 1 Feb 2023 · Updated 13 Feb 2025

Is your project on an affected symfony/http-kernel?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

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
Update to the fixed version for your release line, for example:composer require symfony/http-kernel:^4.4.50
Affected
>=5.0.0 <5.4.20
Fixed in
5.4.20
Update to the fixed version for your release line, for example:composer require symfony/http-kernel:^5.4.20
Affected
>=6.0.0 <6.0.20
Fixed in
6.0.20
Update to the fixed version for your release line, for example:composer require symfony/http-kernel:^6.0.20
Affected
>=6.1.0 <6.1.12
Fixed in
6.1.12
Update to the fixed version for your release line, for example:composer require symfony/http-kernel:^6.1.12
Affected
>=6.2.0 <6.2.6
Fixed in
6.2.6
Update to the fixed version for your release line, for example:composer require symfony/http-kernel:^6.2.6
Affected
>=2.0.0 <4.4.50
Fixed in
4.4.50
Update to the fixed version for your release line, for example:composer require symfony/symfony:^4.4.50
Affected
>=5.0.0 <5.4.20
Fixed in
5.4.20
Update to the fixed version for your release line, for example:composer require symfony/symfony:^5.4.20
Affected
>=6.0.0 <6.0.20
Fixed in
6.0.20
Update to the fixed version for your release line, for example:composer require symfony/symfony:^6.0.20
Affected
>=6.1.0 <6.1.12
Fixed in
6.1.12
Update to the fixed version for your release line, for example:composer require symfony/symfony:^6.1.12
Affected
>=6.2.0 <6.2.6
Fixed in
6.2.6
Update to the fixed version for your release line, for example:composer require symfony/symfony:^6.2.6

Details

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
All 8 advisories for symfony/http-kernel

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.