CVE-2022-24790: Puma Puma Vulnerable To HTTP Request Vulnerability
CRITICALCVE-2022-24790 is a CRITICAL (CVSS 9.1) puma vulnerable to http request vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Puma libraries in the RubyGems ecosystem. The issue involves puma vulnerable to http request smuggling. Remediation is available by upgrading affected packages to version 5.6.4, 4.3.12.
CVE-2022-24790 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2022-24790
To remediate this vulnerability, upgrade all affected Puma dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade puma to 5.6.4
Upgrade puma to 4.3.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for puma
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-24790, inspect your project dependencies for Puma:
inspect dependencies for puma
Analyze the terminal output to locate any version of Puma in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.6.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Puma, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-24790 Affected Puma Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2022-24790?
Which Puma versions are affected?
What version fixes CVE-2022-24790?
Is puma affected?
What is the CVSS score of CVE-2022-24790?
What CWE is associated with CVE-2022-24790?
How can I check RubyGems dependencies for CVE-2022-24790?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h99w-9q5r-gjq9",
"modified" : "2022-08-16T19:37:40Z",
"published" : "2022-03-30T21:48:50Z",
"aliases" : [ "CVE-2022-24790" ],
"summary" : "Puma vulnerable to HTTP Request Smuggling",
"details" : "When using Puma behind a proxy that does not properly validate that the incoming HTTP request matches the RFC7230 standard, Puma and the frontend proxy may disagree on where a request starts and ends. This would allow requests to be smuggled via the front-end proxy to Puma.\n\nThe following vulnerabilities are addressed by this advisory:\n- Lenient parsing of `Transfer-Encoding` headers, when unsupported encodings should be rejected and the final encoding must be `chunked`.\n- Lenient parsing of malformed `Content-Length` headers and chunk sizes, when only digits and hex digits should be allowed.\n- Lenient parsing of duplicate `Content-Length` headers, when they should be rejected.\n- Lenient parsing of the ending of chunked segments, when they should end with `\\r\\n`.\n\nThe vulnerability has been fixed in 5.6.4 and 4.3.12. When deploying a proxy in front of Puma, turning on any and all functionality to make sure that the request matches the RFC7230 standard. \n\nThese proxy servers are known to have \"good\" behavior re: this standard and upgrading Puma may not be necessary. Users are encouraged to validate for themselves.\n\n- Nginx (latest)\n- Apache (latest)\n- Haproxy 2.5+\n- Caddy (latest)\n- Traefik (latest)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "puma"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.6.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "puma"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/puma/puma/security/advisories/GHSA-h99w-9q5r-gjq9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24790"
}, {
"type" : "WEB",
"url" : "https://github.com/puma/puma/commit/5bb7d202e24dec00a898dca4aa11db391d7787a5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/puma/puma"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2022-24790.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2022/08/msg00015.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F6YWGIIKL7KKTS3ZOAYMYPC7D6WQ5OA5"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/L7NESIBFCNSR3XH7LXDPKVMSUBNUB43G"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TUBFJ44NCKJ34LECZRAP4N5VL6USJSIB"
}, {
"type" : "WEB",
"url" : "https://portswigger.net/web-security/request-smuggling"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202208-28"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2022/dsa-5146"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-444" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-30T21:48:50Z",
"nvd_published_at" : "2022-03-30T22:15:00Z"
}
}