CVE-2020-5247
Description
In Puma (RubyGem) before 4.3.2 and before 3.12.3, if an application using Puma allows untrusted input in a response header, an attacker can use newline characters (i.e. `CR`, `LF` or`/r`, `/n`) to end the header and inject malicious content, such as additional headers or an entirely new response body. This vulnerability is known as HTTP Response Splitting. While not an attack in itself, response splitting is a vector for several other attacks, such as cross-site scripting (XSS). This is related to CVE-2019-16254, which fixed this vulnerability for the WEBrick Ruby web server. This has been fixed in versions 4.3.2 and 3.12.3 by checking all headers for line endings and rejecting headers with those characters.
Weakness
- CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers
Timeline
- 2020-02-28Published by the CNA16:55 UTC
- 2020-02-28GitHub advisory published (GHSA-84j7-475p-hp8v)same day
Exploit and advisory records
GitHub advisory GHSA-84j7-475p-hp8v, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| RubyGems puma | before 3.12.4 | 3.12.4 |
| RubyGems puma | from 4.0.0 before 4.3.3 | 4.3.3 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| puma puma | through 3.12.3no fix listedfrom 4.0.0 through 4.3.2no fix listed | not listednot listed |
| ruby-lang ruby | through 2.3.0no fix listedfrom 2.4.0 through 2.4.7no fix listedfrom 2.5.0 through 2.5.6no fix listedfrom 2.6.0 through 2.6.4no fix listed2.7.0no fix listed | not listednot listednot listednot listednot listed |
| debian debian_linux | 9.0no fix listed | not listed |
| fedoraproject fedora | 30no fix listed31no fix listed32no fix listed | not listednot listednot listed |
References
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BMJ3CGZ3DLBJ5WUUKMI5ZFXFJQMXJZIK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DIHVO3CQMU7BZC7FCTSRJ33YDNS3GFPK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NJ3LL5F5QADB6LM46GXZETREAKZMQNRD/
- https://www.ruby-lang.org/en/news/2019/10/01/http-response-splitting-in-webrick-cve-2019-16254
- https://github.com/puma/puma/security/advisories/GHSA-84j7-475p-hp8v
- https://lists.debian.org/debian-lts-announce/2022/05/msg00034.html
- https://owasp.org/www-community/attacks/HTTP_Response_Splitting
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2020-5247'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2020-5247'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2020-5247'curl 'https://api.contrastcyber.com/cve_products/CVE-2020-5247'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).