CVE-2020-15094: RCE in Symfony
CVE-2020-15094: Prevent RCE when calling untrusted remote with CachingHttpClient
Other sources
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.
— GitHub
In Symfony before versions 4.4.13 and 5.1.5, 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. This has been fixed in versions 4.4.13 and 5.1.5.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2020-15094?
CVE-2020-15094 is a vulnerability in the Symfony HttpClient component that allows remote code execution (RCE) when calling an untrusted remote.
What is the severity of CVE-2020-15094?
CVE-2020-15094 has a severity value of 8.8, which is considered high.
Which software packages are affected by CVE-2020-15094?
The affected software packages include Symfony HttpKernel and Symfony HttpClient versions 4.3.0 up to 4.4.13, and versions 5.0.0 up to 5.1.5. It also affects Sensiolabs Httpclient versions 4.4.0 up to 4.4.13 and versions 5.1.0 up to 5.1.5, as well as Sensiolabs Symfony versions 4.4.0 up to 4.4.13 and versions 5.1.0 up to 5.1.5.
How does the CachingHttpClient class in Symfony handle requests?
The CachingHttpClient class in Symfony relies on the HttpCache class to handle requests.
What headers does the HttpCache class use to control the restoration of cached responses?
The HttpCache class uses internal headers like X-Body-Eval and X-Body-File to control the restoration of cached responses.