Puma Source IP Spoofing Vulnerability via PROXY Protocol v1 on Persistent Connections

Vulnerability

A vulnerability in Puma, a Ruby/Rack web server, allows for source IP spoofing when PROXY protocol v1 is enabled and persistent connections are used. This issue affects Puma versions 5.5.0 prior to 7.2.1 and 8.0.2. The vulnerability arises because Puma incorrectly re-parses PROXY protocol headers after each keep-alive request on the same connection. An attacker could inject a second PROXY header, overwriting the REMOTE_ADDR variable. This misconfiguration can lead to security issues, as applications may rely on REMOTE_ADDR for security decisions, rate limiting, or auditing.

Impact

Exploitation of this vulnerability can mislead applications or middleware that use the REMOTE_ADDR variable for security decisions, rate limiting, auditing, or managing allow/deny lists.

Reproduction

To reproduce this vulnerability, deploy Puma with PROXY protocol v1 parsing enabled and use persistent connections. An attacker can then send HTTP requests through a trusted proxy, injecting a second PROXY header that Puma will incorrectly prioritize, allowing the attacker to spoof the source IP address.

Remediation

Users should upgrade to Puma versions 7.2.1 or 8.0.2. If PROXY protocol v1 is not needed, it can be disabled by removing or commenting out the 'set_remote_address proxy_protocol: :v1' line in the configuration. Alternatively, users can disable persistent connections to Puma.

Added: Jul 15, 2026, 5:38 AM
Updated: Jul 15, 2026, 5:38 AM

Vulnerability Rating

Custom Algorithm
spread
5.2
impact
0.6
exploitability
9.3
remediation
8.3
relevance
9.6
threat
4.8
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.