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
8.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2020-15094

GHSA ID

GHSA-754h-5r27-7x3r

Source code

Credits

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