GHSA-754h-5r27-7x3r BIT-symfony-2020-15094 CVE-2020-15094
RCE in Symfony
- Severity
- 8.0 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 3.04%
- Chance of exploitation in the next 30 days. Higher than 87.53% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-212 Improper Removal of Sensitive Information Before Storage or Transfer
- Fix
- Available
- 2 packages have a fixed version
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.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| symfony/http-kernel | >= 4.3.0, < 4.4.13 |
4.4.13 |
| symfony/http-kernel | >= 5.0.0, < 5.1.5 |
5.1.5 |
| symfony/symfony | >= 4.3.0, < 4.4.13 |
4.4.13 |
| symfony/symfony | >= 5.0.0, < 5.1.5 |
5.1.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
symfony/http-kernel Packagist → 4.4.13
- composer
composer require symfony/http-kernel:^4.4.13
symfony/symfony Packagist → 4.4.13
- composer
composer require symfony/symfony:^4.4.13
Severity breakdown
CVSS 3.1 8.0
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer
The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.
How to prevent it
- Requirements: Clearly specify which information should be regarded as private or sensitive, and require that the product offers functionality that allows the user to cleanse the sensitive information from the resource before it is published or exported to other parties.
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
- Implementation, Operation: Some tools can automatically analyze documents to redact, strip, or "sanitize" private information, although some human review might be necessary. Tools may vary in terms of which document formats can be processed. When calling an external program to automatically generate or convert documents, invoke the program with any available options that avoid generating sensitive metadata. Some formats have well-defined fields that could contain private data, such as Exchangeable image file format (Exif), which can contain potentially sensitive metadata such as geolocation, date, and time [REF-1515] [REF-1516].
- Implementation: Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
- Implementation: Avoid errors related to improper resource shutdown or release (CWE-404), which may leave the sensitive data within the resource if it is in an incomplete state.
References
Advisories
Packages
Other links
- github.com/symfony/symfony/security/advisories/GHSA-754h-5r27-7x3r
- github.com/symfony/symfony/commit/d9910e0b33a2e0f993abff41c6fbc86951b66d78
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-kernel/CVE…
- github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-202…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HNGUW…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VAQJX…
- packagist.org/packages/symfony/http-kernel
- packagist.org/packages/symfony/symfony
- symfony.com/cve-2020-15094
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-2v3c-qxhr-7vpv Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process | High | Also affects symfony/symfony |
| GHSA-r925-mgvr-h9cc Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header | High | Also affects symfony/symfony |
| GHSA-h5x3-xfc9-m39h Symfony: UrlGenerator Dot-Segment Encoding Skips Every Other Chained `../` or `./` → Generated URL Collapses Off-Route Under RFC 3986 Normalization | Medium | Also affects symfony/symfony |
| GHSA-v3wm-qf9p-c549 Symfony: HtmlSanitizer URL Parser Deny Gates Underinclusive: Percent-Encoded BiDi Marks and Unicode Whitespace Bypass Visual-Spoofing Defense | Medium | Also affects symfony/symfony |
| GHSA-rrj9-5q2j-4gvr Symfony: Mailomat Mailer Webhook Parser Reads the HMAC Algorithm from the Request: Signature Algorithm Downgrade | Medium | Also affects symfony/symfony |
| GHSA-38cx-cq6f-5755 Symfony: IpUtils::PRIVATE_SUBNETS Omits IPv6 Transition Forms (6to4, NAT64, Teredo, IPv4-compatible): SSRF Bypass in NoPrivateNetworkHttpClient | High | Also affects symfony/symfony |
| GHSA-6h46-9jf5-q59x Symfony: Security Firewall Bypass via failure_forward Subrequest: Unauthenticated Access to access_control-Protected GET Routes | High | Also affects symfony/symfony |
| GHSA-x5qj-865h-mgvm Symfony: HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes | Medium | Also affects symfony/symfony |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor