CVE-2025-61780
Fixed in a distro release EPSS <1%CVSS 5.8
Rack is a modular Ruby web server interface. Prior to versions 2.2.20, 3.1.18, and 3.2.3, a possible information disclosure vulnerability existed in `Rack::Sendfile` when running behind a proxy that supports `x-sendfile` headers (such as Nginx). Specially crafted headers could cause `Rack::Sendfile` to miscommunicate with the proxy and trigger unintended internal requests, potentially bypassing proxy-level access restrictions. When `Rack::Sendfile` received untrusted `x-sendfile-type` or `x-accel-mapping` headers from a client, it would interpret them as proxy configuration directives. This could cause the middleware to send a "redirect" response to the proxy, prompting it to reissue a new internal request that was not subject to the proxy's access controls. An attacker could exploit this by setting a crafted `x-sendfile-type: x-accel-redirect` header, setting a crafted `x-accel-mapping` header, and requesting a path that qualifies for proxy-based acceleration. Attackers could bypass proxy-enforced restrictions and access internal endpoints intended to be protected (such as administrative pages). The vulnerability did not allow arbitrary file reads but could expose sensitive application routes. This issue only affected systems meeting all of the following conditions: The application used `Rack::Sendfile` with a proxy that supports `x-accel-redirect` (e.g., Nginx); the proxy did **not** always set or remove the `x-sendfile-type` and `x-accel-mapping` headers; and the application exposed an endpoint that returned a body responding to `.to_path`. Users should upgrade to Rack versions 2.2.20, 3.1.18, or 3.2.3, which require explicit configuration to enable `x-accel-redirect`. Alternatively, configure the proxy to always set or strip the header, or in Rails applications, disable sendfile completely.
Products: Rack
Fixed upstream
| Ecosystem | Package | Fixed in |
|---|---|---|
| RubyGems | rack | 2.2.20 |
| RubyGems | rack | 3.1.18 |
| RubyGems | rack | 3.2.3 |
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Chainguard | gitlab-cng-18.2 | no fix |
| Chainguard | gitlab-rails-ce-18.1 | 18.1.6-r13 |
| Chainguard | gitlab-rails-ce-18.2 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.1 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.2 | no fix |
| Chainguard | kube-fluentd-operator | 1.18.2-r49 |
| Chainguard | kube-fluentd-operator-compat | 1.18.2-r49 |
| Chainguard | kube-fluentd-operator-default-config | 1.18.2-r49 |
| Chainguard | kube-fluentd-operator-oci-entrypoint | 1.18.2-r49 |
| Chainguard | logstash-8.17 | 8.17.10-r4 |
| Chainguard | logstash-8.17-compat | 8.17.10-r4 |
| Chainguard | logstash-8.17-env2yaml | 8.17.10-r4 |
| Chainguard | logstash-8.17-iamguarded-compat | 8.17.10-r4 |
| Chainguard | logstash-8.17-with-output-opensearch | 8.17.10-r4 |
| Chainguard | logstash-8.18 | 8.18.8-r2 |
| Chainguard | logstash-8.18-compat | 8.18.8-r2 |
| Chainguard | logstash-8.18-env2yaml | 8.18.8-r2 |
| Chainguard | logstash-8.18-iamguarded-compat | 8.18.8-r2 |
| Chainguard | logstash-8.18-with-output-opensearch | 8.18.8-r2 |
| Chainguard | logstash-8.19 | 8.19.5-r2 |
| Chainguard | logstash-8.19-compat | 8.19.5-r2 |
| Chainguard | logstash-8.19-env2yaml | 8.19.5-r2 |
| Chainguard | logstash-8.19-iamguarded-compat | 8.19.5-r2 |
| Chainguard | logstash-8.19-with-output-opensearch | 8.19.5-r2 |
| Chainguard | logstash-9.0 | 9.0.8-r2 |
| Chainguard | logstash-9.0-compat | 9.0.8-r2 |
| Chainguard | logstash-9.0-env2yaml | 9.0.8-r2 |
| Chainguard | logstash-9.0-iamguarded-compat | 9.0.8-r2 |
| Chainguard | logstash-9.0-with-output-opensearch | 9.0.8-r2 |
| Chainguard | logstash-9.1 | 9.1.5-r2 |
| Chainguard | logstash-9.1-bitnami-compat | 9.1.5-r2 |
| Chainguard | logstash-9.1-compat | 9.1.5-r2 |
| Chainguard | logstash-9.1-env2yaml | 9.1.5-r2 |
| Chainguard | logstash-9.1-iamguarded-compat | 9.1.5-r2 |
| Chainguard | logstash-9.1-with-output-opensearch | 9.1.5-r2 |
| Chainguard | ruby3.2-rack-2.2 | 2.2.22-r0 |
| Chainguard | ruby3.2-rails-7.2 | 7.2.2.2-r2 |
| Chainguard | ruby3.2-rails-7.2-compat | 7.2.2.2-r2 |
| Chainguard | ruby3.2-rails-8.0 | 8.0.3-r2 |
| Chainguard | ruby3.2-rails-8.0-compat | 8.0.3-r2 |
| Chainguard | ruby3.3-rack-2.2 | 2.2.22-r0 |
| Chainguard | ruby3.3-rails-7.2 | 7.2.2.2-r2 |
| Chainguard | ruby3.3-rails-7.2-compat | 7.2.2.2-r2 |
| Chainguard | ruby3.3-rails-8.0 | 8.0.3-r2 |
| Chainguard | ruby3.3-rails-8.0-compat | 8.0.3-r2 |
| Chainguard | ruby3.4-rack-2.2 | 2.2.22-r0 |
| Chainguard | ruby3.4-rails-7.2 | 7.2.2.2-r2 |
| Chainguard | ruby3.4-rails-7.2-compat | 7.2.2.2-r2 |
| Chainguard | ruby3.4-rails-8.0 | 8.0.3-r2 |
| Chainguard | ruby3.4-rails-8.0-compat | 8.0.3-r2 |
| Chainguard | ruby4.0-rack-2.2 | 2.2.22-r0 |
| Debian 11 | ruby-rack | 2.1.4-3+deb11u4 |
| Debian 12 | ruby-rack | 2.2.20-0+deb12u1 |
| Debian 13 | ruby-rack | 3.1.18-1~deb13u1 |
| Debian 14 | ruby-rack | 3.1.18-1 |
| SUSE Linux Enterprise High Availability Extension 15 SP3 | rubygem-rack | 2.2.20-150000.3.34.1 |
| SUSE Linux Enterprise High Availability Extension 15 SP4 | rubygem-rack | 2.2.20-150000.3.34.1 |
| SUSE Linux Enterprise High Availability Extension 15 SP5 | rubygem-rack | 2.2.20-150000.3.34.1 |
| SUSE Linux Enterprise High Availability Extension 15 SP6 | rubygem-rack | 2.2.20-150000.3.34.1 |
| SUSE Linux Enterprise High Availability Extension 15 SP7 | rubygem-rack | 2.2.20-150000.3.34.1 |
| Ubuntu 22.04 LTS | ruby-rack | 2.1.4-5ubuntu1.2 |
| Ubuntu 24.04 LTS | ruby-rack | 2.2.7-1ubuntu0.5 |
| Ubuntu 25.10 | ruby-rack | 3.1.16-0.1ubuntu0.1 |
| Ubuntu Pro 14.04 LTS | ruby-rack | no fix |
| Ubuntu Pro 16.04 LTS | ruby-rack | 1.6.4-3ubuntu0.2+esm9 |
| Ubuntu Pro 18.04 LTS | ruby-rack | 1.6.4-4ubuntu0.2+esm9 |
| Ubuntu Pro 20.04 LTS | ruby-rack | 2.0.7-2ubuntu0.1+esm8 |
| Wolfi | gitlab-cng-18.2 | no fix |
| Wolfi | kube-fluentd-operator | 1.18.2-r49 |
| Wolfi | kube-fluentd-operator-compat | 1.18.2-r49 |
| Wolfi | kube-fluentd-operator-default-config | 1.18.2-r49 |
| Wolfi | kube-fluentd-operator-oci-entrypoint | 1.18.2-r49 |
| Wolfi | ruby3.2-rack-2.2 | 2.2.22-r0 |
| Wolfi | ruby3.3-rack-2.2 | 2.2.22-r0 |
| Wolfi | ruby3.4-rack-2.2 | 2.2.22-r0 |
| Wolfi | ruby4.0-rack-2.2 | 2.2.22-r0 |
| openSUSE Leap 15.6 | rubygem-rack | 2.2.20-150000.3.34.1 |