CriticalGHSA-h99w-9q5r-gjq9CVE-2022-24790

Puma vulnerable to HTTP Request Smuggling

Published 30 Mar 2022 · Updated 16 Feb 2024

Is your project on an affected puma?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

pumaRubyGems
Affected
>=5.0.0 <5.6.4
Fixed in
5.6.4
Update to the fixed version for your release line, for example:bundle update --conservative puma # Gemfile: '>= 5.6.4'
pumaRubyGems
Affected
<4.3.12
Fixed in
4.3.12
Update to the fixed version for your release line, for example: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-Encoding headers, when unsupported encodings should be rejected and the final encoding must be chunked.
  • Lenient parsing of malformed Content-Length headers and chunk sizes, when only digits and hex digits should be allowed.
  • Lenient parsing of duplicate Content-Length headers, 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
All 14 advisories for puma

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.