Puma vulnerable to HTTP Request Smuggling
Published 30 Mar 2022 · Updated 16 Feb 2024
Is your project on an affected puma?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=5.0.0 <5.6.4
- Fixed in
- 5.6.4
bundle update --conservative puma # Gemfile: '>= 5.6.4'- Affected
- <4.3.12
- Fixed in
- 4.3.12
bundle update --conservative puma # Gemfile: '>= 4.3.12'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.
The following vulnerabilities are addressed by this advisory:
- Lenient parsing of
Transfer-Encodingheaders, when unsupported encodings should be rejected and the final encoding must bechunked. - Lenient parsing of malformed
Content-Lengthheaders and chunk sizes, when only digits and hex digits should be allowed. - Lenient parsing of duplicate
Content-Lengthheaders, when they should be rejected. - Lenient parsing of the ending of chunked segments, when they should end with
\r\n.
The 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.
These 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.
- Nginx (latest)
- Apache (latest)
- Haproxy 2.5+
- Caddy (latest)
- Traefik (latest)
Is GHSA-h99w-9q5r-gjq9 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected puma, and gives you the command that fixes it.
More advisories for puma
- HighCVE-2026-47737Puma PROXY Protocol v1 Accepts Repeated Protocol Headers on Persistent Connections · 9 Jun 2026
- HighCVE-2026-47736Puma PROXY Protocol v1 Parser Allows Remote Memory Exhaustion · 8 Jun 2026
- MediumCVE-2024-45614Puma's header normalization allows for client to clobber proxy set headers · 20 Sept 2024
- MediumCVE-2024-21647Puma HTTP Request/Response Smuggling vulnerability · 8 Jan 2024
- CriticalCVE-2023-40175Puma HTTP Request/Response Smuggling vulnerability · 18 Aug 2023
- HighCVE-2022-23634Puma used with Rails may lead to Information Exposure · 11 Feb 2022
References
- Linkgithub.com/puma/puma/security/advisories/GHSA-h99w-9q5r-gjq9
- Advisorynvd.nist.gov/vuln/detail/CVE-2022-24790
- Linkgithub.com/puma/puma/commit/5bb7d202e24dec00a898dca4aa11db391d7787a5
- Packagegithub.com/puma/puma
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2022-24790.yml
- Linklists.debian.org/debian-lts-announce/2022/08/msg00015.html
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F6YWGIIKL7KKTS3ZOAYMYPC7D6WQ5OA5
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/L7NESIBFCNSR3XH7LXDPKVMSUBNUB43G
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TUBFJ44NCKJ34LECZRAP4N5VL6USJSIB
- Linkportswigger.net/web-security/request-smuggling
- Linksecurity.gentoo.org/glsa/202208-28
- Linkwww.debian.org/security/2022/dsa-5146
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.