Vulnerability GHSA-h99w-9q5r-gjq9

Critical
CRITICAL RISK
CVSS Score: 9.1
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
4 years ago
March 30, 2022 at 09:48 PM UTC
Puma vulnerable to HTTP Request Smuggling
0.8.0 - 4.3.11 and 5.0.0 - 5.6.2
0.8.0 - 4.3.11 and 5.0.0 - 5.6.2

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.

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)

Impacted packages

Timeline

Published
4 years ago
March 30, 2022 at 09:48 PM UTC
Fixed (5.6.4)
4 years ago
March 30, 2022 at 02:30 PM UTC
Fixed (4.3.12)
4 years ago
March 30, 2022 at 03:59 PM UTC
Last Modified
2 years ago
February 16, 2024 at 07:55 AM UTC