CVE-2022-24894: Symfony/symfony Symfony Storing Cookie Headers Vulnerability
MODERATECVE-2022-24894 is a MODERATE (CVSS 5.9) symfony storing cookie headers vulnerability (CWE-285: Improper Authorization) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves symfony storing cookie headers in httpcache. Remediation is available by upgrading affected packages to version 6.0.20, 6.1.12, 4.4.50, 5.4.20, 6.2.6.
CVE-2022-24894 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L).
How to Fix CVE-2022-24894
To remediate this vulnerability, upgrade all affected Symfony/symfony dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/symfony to 6.0.20
Upgrade symfony/symfony to 6.1.12
Upgrade symfony/http-kernel to 4.4.50
Upgrade symfony/http-kernel to 5.4.20
Upgrade symfony/http-kernel to 6.0.20
Upgrade symfony/http-kernel to 6.1.12
Upgrade symfony/http-kernel to 6.2.6
Upgrade symfony/symfony to 4.4.50
Upgrade symfony/symfony to 5.4.20
Upgrade symfony/symfony to 6.2.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/symfony
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-24894, inspect your project dependencies for Symfony/symfony:
inspect dependencies for symfony/symfony
Analyze the terminal output to locate any version of Symfony/symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.20), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Symfony/symfony, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-24894 Affected Symfony/symfony Versions
10 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/symfony
|
Packagist |
≥ 6.0.0
< 6.0.20
|
6.0.20
|
|
symfony/symfony
|
Packagist |
≥ 6.1.0
< 6.1.12
|
6.1.12
|
|
symfony/http-kernel
|
Packagist |
≥ 2.0.0
< 4.4.50
|
4.4.50
|
|
symfony/http-kernel
|
Packagist |
≥ 5.0.0
< 5.4.20
|
5.4.20
|
|
symfony/http-kernel
|
Packagist |
≥ 6.0.0
< 6.0.20
|
6.0.20
|
|
symfony/http-kernel
|
Packagist |
≥ 6.1.0
< 6.1.12
|
6.1.12
|
|
symfony/http-kernel
|
Packagist |
≥ 6.2.0
< 6.2.6
|
6.2.6
|
|
symfony/symfony
|
Packagist |
≥ 2.0.0
< 4.4.50
|
4.4.50
|
|
symfony/symfony
|
Packagist |
≥ 5.0.0
< 5.4.20
|
5.4.20
|
|
symfony/symfony
|
Packagist |
≥ 6.2.0
< 6.2.6
|
6.2.6
|
References
Frequently Asked Questions
What is CVE-2022-24894?
Which Symfony/symfony versions are affected?
What version fixes CVE-2022-24894?
Is symfony/symfony affected?
Is symfony/http-kernel affected?
What is the CVSS score of CVE-2022-24894?
What CWE is associated with CVE-2022-24894?
How can I check Packagist dependencies for CVE-2022-24894?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h7vf-5wrv-9fhv",
"modified" : "2025-02-13T18:36:40Z",
"published" : "2023-02-01T18:48:09Z",
"aliases" : [ "CVE-2022-24894" ],
"summary" : "Symfony storing cookie headers in HttpCache",
"details" : "Description\n-----------\n\nThe Symfony HTTP cache system acts as a reverse proxy: it caches HTTP responses (including headers) and returns them to clients.\n\nIn 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.\n\nResolution\n----------\n\nThe `HttpStore` constructor now takes a parameter containing a list of private headers that are removed from the HTTP response headers.\nThe default value for this parameter is `Set-Cookie`, but it can be overridden or extended by the application.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/d2f6322af9444ac5cd1ef3ac6f280dbef7f9d1fb) for branch 4.4.\n\nCredits\n-------\n\nWe would like to thank Soner Sayakci for reporting the issue and Nicolas Grekas for fixing it.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "4.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.4.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.1.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-kernel"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.2.0"
}, {
"fixed" : "6.2.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "4.4.50"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.4.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.0.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.1.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.2.0"
}, {
"fixed" : "6.2.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-h7vf-5wrv-9fhv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24894"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/d2f6322af9444ac5cd1ef3ac6f280dbef7f9d1fb"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-kernel/CVE-2022-24894.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2022-24894.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/07/msg00014.html"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2022-24894"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-01T18:48:09Z",
"nvd_published_at" : "2023-02-03T22:15:00Z"
}
}