CVE-2022-24894
JSON

5.9medium

Symfony storing cookie headers in HttpCache

Severity
5.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
4.11% (higher than 91% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-h7vf-5wrv-9fhvBIT-SYMFONY-2022-24894

Description

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. The Symfony HTTP cache system, acts as a reverse proxy: It caches entire responses (including headers) and returns them to the clients. In a recent change in the `AbstractSessionListener`, the response might contain a `Set-Cookie` header. If the Symfony HTTP cache system is enabled, this response might bill stored and return to the next clients. An attacker can use this vulnerability to retrieve the victim's session. This issue has been patched and is available for branch 4.4.

Affected

Product or packageVersionsReported by
symfony symfony>= 2.0.0, < 4.4.50, >= 5.0.0, < 5.4.20, >= 6.0.0, < 6.0.20, >= 6.1.0, < 6.1.12, >= 6.2.0, < 6.2.6CVE List
symfony/http-kernel (Packagist)from 2.0.0 before 4.4.50, from 5.0.0 before 5.4.20, from 6.0.0 before 6.0.20, from 6.1.0 before 6.1.12, from 6.2.0 before 6.2.6GitHub Advisory Database
symfony/symfony (Packagist)from 2.0.0 before 4.4.50, from 5.0.0 before 5.4.20, from 6.0.0 before 6.0.20, from 6.1.0 before 6.1.12, from 6.2.0 before 6.2.6GitHub Advisory Database
sensiolabs symfonyfrom 2.0.0 before 4.4.50, from 5.0.0 before 5.4.2, from 6.0.0 before 6.0.20, from 6.1.0 before 6.1.12, from 6.2.0 before 6.2.6NVD
symfony (Bitnami)from 2.0.0 before 4.4.50, from 5.0.0 before 5.4.2, from 6.0.0 before 6.0.20, from 6.1.0 before 6.1.12, from 6.2.0 before 6.2.6Bitnami Vulnerability Database

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasehigh rating

Classification

CWE-285

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. The Symfony HTTP cache system, acts as a reverse proxy: It caches entire responses (including headers) and returns them to the clients. In a recent change in the `AbstractSessionListener`, the response might contain a `Set-Cookie` header. If the Symfony HTTP cache system is enabled, this response might bill stored and return to the next clients. An attacker can use this vulnerability to retrieve the victim's session. This issue has been patched and is available for branch 4.4.

GitHub Advisory Database

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-24894 changed 2025-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-h7vf-5wrv-9fhv changed 2025-02-13CC-BY-4.0
NVDCVE-2022-24894 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-SYMFONY-2022-24894 changed 2024-03-06Apache-2.0