Skip to content

RCE in Symfony

High severity GitHub Reviewed Published Sep 2, 2020 in symfony/symfony • Updated Feb 15, 2024

Package

composer symfony/http-kernel (Composer)

Affected versions

>= 5.0.0, < 5.1.5
>= 4.3.0, < 4.4.13

Patched versions

5.1.5
4.4.13
composer symfony/symfony (Composer)
>= 5.0.0, < 5.1.5
>= 4.3.0, < 4.4.13
5.1.5
4.4.13

Description

Description

The CachingHttpClient class from the HttpClient Symfony component relies on the HttpCache class to handle requests. HttpCache uses internal headers like X-Body-Eval and X-Body-File to control the restoration of cached responses. The class was initially written with surrogate caching and ESI support in mind (all HTTP calls come from a trusted backend in that scenario). But when used by CachingHttpClient and if an attacker can control the response for a request being made by the CachingHttpClient, remote code execution is possible.

Resolution

HTTP headers designed for internal use in HttpCache are now stripped from remote responses before being passed to HttpCache.

The patch for this issue is available here for the 4.4 branch.

Credits

I would like to thank Matthias Pigulla (webfactory GmbH) for reporting and fixing the issue.

References

@fabpot fabpot published to symfony/symfony Sep 2, 2020
Reviewed Sep 2, 2020
Published to the GitHub Advisory Database Sep 2, 2020
Published by the National Vulnerability Database Sep 2, 2020
Last updated Feb 15, 2024

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

EPSS score

0.712%
(81st percentile)

Weaknesses

CVE ID

CVE-2020-15094

GHSA ID

GHSA-754h-5r27-7x3r

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.