Puma with proxy which forwards LF characters as line endings could allow HTTP request smuggling
Published 12 Oct 2021 · Updated 8 Jul 2026
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.5.1
- Fixed in
- 5.5.1
bundle update --conservative puma # Gemfile: '>= 5.5.1'- Affected
- <4.3.9
- Fixed in
- 4.3.9
bundle update --conservative puma # Gemfile: '>= 4.3.9'Details
Impact
Prior to puma version 5.5.0, using puma with a proxy which forwards LF characters as line endings could allow HTTP request smuggling. A client could smuggle a request through a proxy, causing the proxy to send a response back to another unknown client.
This behavior (forwarding LF characters as line endings) is very uncommon amongst proxy servers, so we have graded the impact here as "low". Puma is only aware of a single proxy server which has this behavior.
If the proxy uses persistent connections and the client adds another request in via HTTP pipelining, the proxy may mistake it as the first request's body. Puma, however, would see it as two requests, and when processing the second request, send back a response that the proxy does not expect. If the proxy has reused the persistent connection to Puma to send another request for a different client, the second response from the first client will be sent to the second client.
Patches
This vulnerability was patched in Puma 5.5.1 and 4.3.9.
Workarounds
This vulnerability only affects Puma installations without any proxy in front.
Use a proxy which does not forward LF characters as line endings.
Proxies which do not forward LF characters as line endings:
- Nginx
- Apache (>2.4.25)
- Haproxy
- Caddy
- Traefik
Possible Breakage
If you are dealing with legacy clients that want to send `LF` as a line ending in an HTTP header, this will cause those clients to receive a 400 error.
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in Puma
- See our security policy
Is GHSA-48w2-rm65-62xx 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
- CriticalCVE-2022-24790Puma vulnerable to HTTP Request Smuggling · 30 Mar 2022
References
- Linkgithub.com/puma/puma/security/advisories/GHSA-48w2-rm65-62xx
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-41136
- Linkgithub.com/puma/puma/commit/436c71807f00e07070902a03f79fd3e130eb6b18
- Linkgithub.com/puma/puma/commit/acdc3ae571dfae0e045cf09a295280127db65c7f
- Linkgithub.com/puma/puma/commit/fb6ad8f8013ab5cdbb2f444cbfabd0b4fde71139
- Packagegithub.com/puma/puma
- Linkgithub.com/puma/puma/releases/tag/v4.3.9
- Linkgithub.com/puma/puma/releases/tag/v5.5.1
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2021-41136.yml
- Linklists.debian.org/debian-lts-announce/2022/08/msg00015.html
- 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.