CVE-2026-47737: Puma PROXY Protocol v1 Accepts Repeated Protocol Headers on Persistent Connections
Impact
Puma is vulnerable to source IP spoofing when setremoteaddress proxyprotocol: :v1 is enabled and persistent connections are used.
PROXY protocol v1 is a connection-level protocol. Support was added to Puma in v5.5.0. A proxy sends one PROXY header at the beginning of a TCP connection, before any HTTP data. Puma incorrectly re-parsed PROXY protocol headers after each keep-alive request on the same connection. An attacker able to send HTTP requests through a trusted proxy could therefore inject a second PROXY header between HTTP requests. Puma would treat the injected header as authoritative for the next request and overwrite REMOTEADDR.
This can mislead applications or middleware that use REMOTEADDR for security decisions, rate limiting, auditing, or allow/deny lists.
Only deployments that explicitly enable PROXY protocol v1 are affected, and will have set:
ruby setremoteaddress proxyprotocol: :v1
Puma's default configuration is not affected. Deployments that do not use persistent connections to Puma are also not expected to be affected by this issue.
Patches
Users should upgrade to versions 7.2.1 or 8.0.2.
Workarounds
Disable PROXY protocol v1 parsing if it is not required:
ruby # remove/comment this: # setremoteaddress proxyprotocol: :v1
Users can also disable persistent connections to Puma, for example:
ruby enablekeepalives false
References
- HAProxy PROXY protocol specification - CVE-2025-31135 / GHSA-c2c3-pqw5-5p7c: go-guerrilla repeated PROXY command source IP spoofing - Puma setremoteaddress documentation
Other sources
Puma is a Ruby/Rack web server built for parallelism. From 5.5.0 until 7.2.1 and 8.0.2, Puma is vulnerable to source IP spoofing when setremoteaddress proxyprotocol: :v1 is enabled and persistent connections are used because Puma incorrectly re-parses PROXY protocol headers after each keep-alive request on the same connection, allowing an attacker to inject a second PROXY header and overwrite REMOTEADDR. This issue is fixed in versions 7.2.1 and 8.0.2.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/pumato a version that resolves this vulnerability.Fixed in 7.2.1 - Upgrade
Upgrade
rubygems/pumato a version that resolves this vulnerability.Fixed in 8.0.2 - Upgrade
Upgrade
Pumato a version that resolves this vulnerability.Fixed in 7.2.1 - Upgrade
Upgrade
Pumato a version that resolves this vulnerability.Fixed in 8.0.2 - Configuration
Disable PROXY protocol v1 parsing by removing/changing `set_remote_address proxy_protocol: :v1` from the Puma configuration if it is not required.
Puma set_remote_address proxy_protocol = :v1 disabled - Configuration
Ensure Puma is configured with `enable_keep_alives false` to avoid the condition where persistent connections enable the PROXY protocol v1 header re-parsing vulnerability (described for persistent connections between 5.5.0 and 7.2.1, and 8.0.2).
Puma enable_keep_alives = false
Event History
Frequently Asked Questions
What is the severity of CVE-2026-47737?
CVE-2026-47737 has a high severity score of 7.5.
What impact does CVE-2026-47737 have?
CVE-2026-47737 allows source IP spoofing when using `set_remote_address proxy_protocol: :v1` with persistent connections.
How do I fix CVE-2026-47737?
To mitigate CVE-2026-47737, disable the PROXY protocol or upgrade Puma to the latest version where this vulnerability is resolved.
Which versions of Puma are affected by CVE-2026-47737?
CVE-2026-47737 affects Puma versions prior to the resolution implemented in version 5.5.0.
What is the nature of the vulnerability in CVE-2026-47737?
The vulnerability in CVE-2026-47737 is related to authentication bypass due to improper handling of remote address information.