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 package | Versions | Reported 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.6 | CVE 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.6 | GitHub 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.6 | GitHub Advisory Database |
| sensiolabs symfony | 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.6 | NVD |
| 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.6 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-24894 changed 2025-03-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h7vf-5wrv-9fhv changed 2025-02-13 | CC-BY-4.0 |
| NVD | CVE-2022-24894 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-SYMFONY-2022-24894 changed 2024-03-06 | Apache-2.0 |