CVE-2020-5255: Symfony/http foundation Prevent Cache Poisoning Vulnerability
LOWCVE-2020-5255 is a LOW (CVSS 2.6) prevent cache poisoning vulnerability (CWE-435: Improper Interaction Between Multiple Correctly-Behaving Entities) affecting Symfony/http foundation libraries in the Packagist ecosystem. The issue involves prevent cache poisoning via a response content-type header in symfony. Remediation is available by upgrading affected packages to version 4.4.7, 5.0.7.
CVE-2020-5255 at a Glance
Security Impact
CVSS: 2.6
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:N/I:N/A:L).
How to Fix CVE-2020-5255
To remediate this vulnerability, upgrade all affected Symfony/http foundation 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/http-foundation to 4.4.7
Upgrade symfony/http-foundation to 5.0.7
Upgrade symfony/symfony to 4.4.7
Upgrade symfony/symfony to 5.0.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/http-foundation
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-5255, inspect your project dependencies for Symfony/http foundation:
inspect dependencies for symfony/http-foundation
Analyze the terminal output to locate any version of Symfony/http foundation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.7), 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-435: Improper Interaction Between Multiple Correctly-Behaving Entities, where an interaction error occurs when two entities have correct behavior when running independently of each other, but when they are integrated as components in a larger system or process, they introduce incorrect behaviors that may cause resultant weaknesses. In Symfony/http foundation, 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-2020-5255 Affected Symfony/http foundation Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/http-foundation
|
Packagist |
≥ 4.4.0
< 4.4.7
|
4.4.7
|
|
symfony/http-foundation
|
Packagist |
≥ 5.0.0
< 5.0.7
|
5.0.7
|
|
symfony/symfony
|
Packagist |
≥ 4.4.0
< 4.4.7
|
4.4.7
|
|
symfony/symfony
|
Packagist |
≥ 5.0.0
< 5.0.7
|
5.0.7
|
References
Frequently Asked Questions
What is CVE-2020-5255?
Which Symfony/http foundation versions are affected?
What version fixes CVE-2020-5255?
Is symfony/http-foundation affected?
Is symfony/symfony affected?
What is the CVSS score of CVE-2020-5255?
What CWE is associated with CVE-2020-5255?
How can I check Packagist dependencies for CVE-2020-5255?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mcx4-f5f5-4859",
"modified" : "2021-01-08T20:25:26Z",
"published" : "2020-03-30T20:09:16Z",
"aliases" : [ "CVE-2020-5255" ],
"summary" : "Prevent cache poisoning via a Response Content-Type header in Symfony",
"details" : "Description\n-----------\n\nWhen a `Response` does not contain a `Content-Type` header, Symfony falls back to the format defined in the `Accept` header of the request, leading to a possible mismatch between the response's content and `Content-Type` header. When the response is cached, this can lead to a corrupted cache where the cached format is not the right one.\n\nResolution\n----------\n\nSymfony does not use the `Accept` header anymore to guess the `Content-Type`.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/dca343442e6a954f96a2609e7b4e9c21ed6d74e6) for the 4.4 branch.\n\nCredits\n-------\n\nI would like to thank Xavier Lacot from JoliCode for reporting & Yonel Ceruto and Tobias Schultze for fixing the issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-foundation"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.4.0"
}, {
"fixed" : "4.4.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/http-foundation"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.4.0"
}, {
"fixed" : "4.4.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-mcx4-f5f5-4859"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5255"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/dca343442e6a954f96a2609e7b4e9c21ed6d74e6"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-foundation/CVE-2020-5255.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2020-5255.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/C36JLPHUPKDFAX6D5WYFC4ALO2K7RDUQ"
}, {
"type" : "WEB",
"url" : "https://symfony.com/blog/cve-2020-5255-prevent-cache-poisoning-via-a-response-content-type-header"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2020-5255"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-435" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-03-30T19:28:58Z",
"nvd_published_at" : null
}
}