|
| 1 | +--- |
| 2 | +layout: advisory |
| 3 | +title: 'CVE-2026-47737 (puma): Puma PROXY Protocol v1 Accepts Repeated Protocol Headers |
| 4 | + on Persistent Connections' |
| 5 | +comments: false |
| 6 | +categories: |
| 7 | +- puma |
| 8 | +advisory: |
| 9 | + gem: puma |
| 10 | + cve: 2026-47737 |
| 11 | + ghsa: 2vqw-3mp8-cgmx |
| 12 | + url: https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-47737 |
| 13 | + title: Puma PROXY Protocol v1 Accepts Repeated Protocol Headers on Persistent Connections |
| 14 | + date: 2026-05-27 |
| 15 | + description: |- |
| 16 | + ## Impact |
| 17 | +
|
| 18 | + Puma is vulnerable to source IP spoofing when set_remote_address |
| 19 | + proxy_protocol: :v1 is enabled and persistent connections are used. |
| 20 | +
|
| 21 | + PROXY protocol v1 is a connection-level protocol. Support was added |
| 22 | + to Puma in v5.5.0. A proxy sends one PROXY header at the beginning |
| 23 | + of a TCP connection, before any HTTP data. Puma incorrectly re-parsed |
| 24 | + PROXY protocol headers after each keep-alive request on the same |
| 25 | + connection. An attacker able to send HTTP requests through a trusted |
| 26 | + proxy could therefore inject a second PROXY header between HTTP |
| 27 | + requests. Puma would treat the injected header as authoritative for |
| 28 | + the next request and overwrite REMOTE_ADDR. |
| 29 | +
|
| 30 | + This can mislead applications or middleware that use REMOTE_ADDR for |
| 31 | + security decisions, rate limiting, auditing, or allow/deny lists. |
| 32 | +
|
| 33 | + Only deployments that explicitly enable PROXY protocol v1 are affected, |
| 34 | + and will have set: |
| 35 | +
|
| 36 | + set_remote_address proxy_protocol: :v1 |
| 37 | +
|
| 38 | + Puma's default configuration is not affected. Deployments that do |
| 39 | + not use persistent connections to Puma are also not expected to |
| 40 | + be affected by this issue. |
| 41 | +
|
| 42 | + ## Workarounds |
| 43 | +
|
| 44 | + * Disable PROXY protocol v1 parsing if it is not required: |
| 45 | +
|
| 46 | + # remove/comment this: |
| 47 | + # set_remote_address proxy_protocol: :v1 |
| 48 | +
|
| 49 | + Users can also disable persistent connections to Puma, for example: |
| 50 | +
|
| 51 | + enable_keep_alives false |
| 52 | + cvss_v3: 7.5 |
| 53 | + unaffected_versions: |
| 54 | + - "< 5.5.0" |
| 55 | + patched_versions: |
| 56 | + - "~> 7.2.1" |
| 57 | + - ">= 8.0.2" |
| 58 | + related: |
| 59 | + url: |
| 60 | + - https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-47737 |
| 61 | + - https://rubygems.org/gems/puma/versions/8.0.2 |
| 62 | + - https://github.com/puma/puma/blob/main/History.md#802--2026-05-27 |
| 63 | + - https://github.com/puma/puma/blob/main/History.md#721--2026-05-27 |
| 64 | + - https://github.com/puma/puma/releases/tag/v8.0.2 |
| 65 | + - https://github.com/puma/puma/releases/tag/v7.2.1 |
| 66 | + - https://github.com/puma/puma/pull/2654 |
| 67 | + - https://github.com/phires/go-guerrilla/security/advisories/GHSA-c2c3-pqw5-5p7c |
| 68 | + - https://github.com/puma/puma/issues/2651 |
| 69 | + - https://rubyweekly.com/issues/803 |
| 70 | + - https://github.com/puma/puma/security/advisories/GHSA-2vqw-3mp8-cgmx |
| 71 | + notes: | |
| 72 | + - https://www.cve.org/CVERecord/SearchResults?query=CVE-2026-47737 (reserved) |
| 73 | + - No nvd cvss values |
| 74 | +--- |
0 commit comments