GHSA-9hf4-67fc-4vf4 CVE-2024-45614
Puma's header normalization allows for client to clobber proxy set headers
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 0.64%
- Chance of exploitation in the next 30 days. Higher than 50.68% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-444 Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
- CWE-639 Authorization Bypass Through User-Controlled Key
- Fix
5.6.9- Upgrade puma to this version or later
Description
Impact
Clients could clobber values set by intermediate proxies (such as X-Forwarded-For) by providing a underscore version of the same header (X-Forwarded_For). Any users trusting headers set by their proxy may be affected. Attackers may be able to downgrade connections to HTTP (non-SSL) or redirect responses, which could cause confidentiality leaks if combined with a separate MITM attack.
Patches
v6.4.3/v5.6.9 now discards any headers using underscores if the non-underscore version also exists. Effectively, allowing the proxy defined headers to always win.
Workarounds
Nginx has a underscores_in_headers configuration variable to discard these headers at the proxy level.
Any users that are implicitly trusting the proxy defined headers for security or availability should immediately cease doing so until upgraded to the fixed versions.
Affected versions
RubyGems
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
puma RubyGems → 5.6.9
- bundler
bundle update puma # Gemfile: gem "puma", ">= 5.6.9"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- Attack vector
- Network
- Attack complexity
- High
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- Low
- Integrity (subsequent systems)
- Low
- Availability (subsequent systems)
- None
CVSS 3.1 5.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Weakness
CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
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.
How to prevent it
- Implementation: Use a web server that employs a strict HTTP parsing procedure, such as Apache [REF-433].
- Implementation: Use only SSL communication.
- Implementation: Terminate the client session after each request.
- System Configuration: Turn all pages to non-cacheable.
CWE-639: Authorization Bypass Through User-Controlled Key
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
How to prevent it
- Architecture and Design: For each and every data access, ensure that the user has sufficient privilege to access the record that is being requested.
- Architecture and Design, Implementation: Make sure that the key that is used in the lookup of a specific user's record is not controllable externally by the user or that any tampering can be detected.
- Architecture and Design: Use encryption in order to make it more difficult to guess other legitimate values of the key or associate a digital signature with the key so that the server can verify that there has been no tampering.
References
Advisories
Packages
Other links
- github.com/puma/puma/security/advisories/GHSA-9hf4-67fc-4vf4
- github.com/puma/puma/commit/cac3fd18cf29ed43719ff5d52d9cfec215f0a043
- github.com/puma/puma/commit/f196b23be24712fb8fb16051cc124798cc84f70e
- github.com/rubysec/ruby-advisory-db/blob/master/gems/puma/CVE-2024-45614.yml
- lists.debian.org/debian-lts-announce/2024/11/msg00004.html
- nginx.org/en/docs/http/ngx_http_core_module.html
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-2vqw-3mp8-cgmx Puma PROXY Protocol v1 Accepts Repeated Protocol Headers on Persistent Connections | High | Also affects puma |
| GHSA-qpgp-93vx-g8v8 Puma PROXY Protocol v1 Parser Allows Remote Memory Exhaustion | High | Also affects puma |
| GHSA-c2f4-cvqm-65w2 Puma HTTP Request/Response Smuggling vulnerability | High | Also affects puma |
| GHSA-68xg-gqqm-vgj8 Puma HTTP Request/Response Smuggling vulnerability | Critical | Also affects puma |
| GHSA-h99w-9q5r-gjq9 Puma vulnerable to HTTP Request Smuggling | Critical | Also affects puma |
| GHSA-rmj8-8hhh-gv5h Puma used with Rails may lead to Information Exposure | High | Also affects puma |
| GHSA-48w2-rm65-62xx Puma with proxy which forwards LF characters as line endings could allow HTTP request smuggling | Low | Also affects puma |
| GHSA-q28m-8xjw-8vr5 Puma's Keepalive Connections Causing Denial Of Service | High | Also affects puma |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor