CVE-2025-61780
Medium · 5.8Rack has a Possible Information Disclosure Vulnerability
CVSS
5.8
EPSS
0.6%
Published
Oct 10, 2025
CISA due date
—
Cloudanix analysis
Some web applications may accidentally let outsiders retrieve protected files if they accept certain file-delivery headers from visitors.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Library
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw affects Rack::Sendfile when Rack applications run behind a reverse proxy that honors sendfile-style headers such as Nginx X-Accel-Redirect or X-Sendfile. By supplying specially crafted request headers, an attacker may influence how Rack::Sendfile selects or maps the proxy offload mechanism, causing the application and proxy to disagree about what internal URI or file should be served. In vulnerable deployments, this can trigger unintended proxy-internal requests and may bypass access controls enforced only at the proxy layer, resulting in disclosure of files or internal routes that should not be directly reachable. The issue is configuration-dependent and requires use of Rack::Sendfile with a compatible proxy sendfile feature.
Why it matters to the business
Successful exploitation could expose restricted files, protected downloads, or internal proxy locations that the application owner expected to be inaccessible without authorization. The practical impact is data exposure rather than code execution, but affected applications may handle sensitive documents, generated exports, customer uploads, or internal-only assets. The vulnerability is not currently listed in CISA KEV, has no reported ransomware association, and has a low EPSS score, but it has been public for an extended period, so internet-facing Rack applications using sendfile proxy integration should still be reviewed and patched during normal vulnerability remediation cycles.
How an attack unfolds
An attacker first identifies a Rack-based web application behind a proxy that supports sendfile delegation, such as Nginx X-Accel-Redirect or X-Sendfile. The attacker then sends requests containing crafted sendfile-related headers, especially headers that influence Rack::Sendfile behavior or path mapping. If the application trusts these headers or allows them to reach Rack::Sendfile, the middleware may emit a proxy sendfile response that causes the front-end proxy to make an unintended internal request. If the proxy relies on internal locations or sendfile redirects for access control, the attacker may receive content that would normally be blocked by proxy rules. Exploitation does not require authentication in the worst case if the vulnerable endpoint is reachable anonymously, but the exposed content depends on application routes, file-serving behavior, and proxy configuration.
How to fix it
Upgrade rack/rack to a version containing commit 6ef591522bb44f80654ad1a80654ba46cafdc7c1 or a downstream release that includes that fix. Because the provided fixed version is a Git commit rather than a package version, verify the exact Rack gem or distribution version used by the application includes this commit. As defense in depth, configure the front-end proxy to strip untrusted client-supplied sendfile control headers before forwarding requests to the application, including X-Sendfile-Type, X-Sendfile, X-Accel-Redirect, and X-Accel-Mapping unless explicitly required from a trusted component. Review Nginx internal locations and X-Accel-Redirect/X-Sendfile mappings to ensure proxy-only paths are not reachable from untrusted input. Avoid relying solely on proxy-level restrictions for authorization decisions; enforce authorization in the application before returning file-send responses.
How to confirm the fix worked
Confirm the deployed Rack code contains commit 6ef591522bb44f80654ad1a80654ba46cafdc7c1 or a vendor release that includes it. Inventory applications using Rack::Sendfile and identify whether they run behind Nginx, Apache/lighttpd modules, or other proxies that honor X-Sendfile-style headers. Test that externally supplied X-Sendfile-Type, X-Sendfile, X-Accel-Redirect, and X-Accel-Mapping headers are stripped or ignored before reaching the Rack application. Perform a controlled negative test against file-download endpoints by sending these headers and confirming the response does not expose alternate files, proxy internal locations, or different behavior. Review proxy configuration for internal-only locations and verify direct external requests to those paths return deny/404 behavior.
Typical attack path
- Reconnaissance identifies a Ruby/Rack application served through a proxy that supports X-Sendfile or X-Accel-Redirect behavior.
- The attacker probes endpoints that return downloadable files, static assets, generated exports, or protected media.
- The attacker submits requests with crafted sendfile-related headers such as X-Sendfile-Type or X-Accel-Mapping.
- Rack::Sendfile processes the request and miscommunicates sendfile instructions to the proxy.
- The proxy performs an unintended internal redirect or file-serving action.
- The attacker receives content from a restricted internal location or file path that should have required authorization or should not have been externally reachable.
How to detect it
To determine whether exploitation already occurred, review reverse proxy, web server, application, and WAF logs for requests containing client-supplied sendfile-related headers. Key log sources include Nginx or other reverse proxy access/error logs, Rack/Ruby application request logs, WAF request-header logs, CDN edge logs if headers are retained, and any audit logs for file-download endpoints. Focus on requests to download, media, export, attachment, or protected-file endpoints that include X-Sendfile-Type, X-Accel-Mapping, X-Accel-Redirect, or X-Sendfile headers. Compare response status codes and byte counts against normal behavior; successful exploitation may appear as ordinary 200 responses with unusual response sizes or access to internal/protected URI patterns. If proxy logs do not record request headers, check WAF/CDN logs or reproduce logging in a lab to understand whether header evidence would have been retained. Also inspect proxy error logs for abnormal internal redirect behavior, failed internal location lookups, or attempts to access internal-only aliases. There are no public threat actors or mature exploit campaigns associated with this issue in the provided data, so detection should focus on anomalous header use and unexpected access to protected file-serving paths rather than named actor tooling.
- X-Sendfile-Type
- X-Sendfile
- X-Accel-Redirect
- X-Accel-Mapping
- HTTP_X_SENDFILE_TYPE
- HTTP_X_ACCEL_MAPPING
- x-sendfile-type:
- x-sendfile:
- x-accel-redirect:
- x-accel-mapping:
- Rack::Sendfile
- X-Accel-Redirect:
- X-Sendfile-Type:
What your security team should do
- Prioritize externally reachable Rack applications that use Rack::Sendfile behind Nginx or another sendfile-capable reverse proxy.
- Upgrade rack/rack to a release containing commit 6ef591522bb44f80654ad1a80654ba46cafdc7c1, and verify lockfiles, container images, and deployed artifacts are rebuilt with the fixed dependency.
- Add proxy rules to drop untrusted inbound sendfile-related headers before requests reach application servers.
- Audit protected download and file-serving flows to ensure authorization is enforced in application code and not only through proxy internal locations.
- Enable or temporarily enhance access logging to capture suspicious inbound headers during the remediation window.
- Search historical logs for requests containing X-Sendfile-Type, X-Accel-Mapping, X-Sendfile, or X-Accel-Redirect headers, especially against download or media endpoints.
- If suspicious activity is found, identify the requested resources, user/session context if available, response status and size, and whether restricted content may have been returned.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| RubyGems | rack | 0 | 2.2.20 |
| RubyGems | rack | 3.0 | 3.1.18 |
| RubyGems | rack | 3.2 | 3.2.3 |
| Chainguard | gitaly-config-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitaly-config-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-base-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-base-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-certificates-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-certificates-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-cfssl-self-sign-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-cfssl-self-sign-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-cng-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-cng-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-container-registry-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-container-registry-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-container-registry-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-container-registry-scripts-18.4 | 0 | 18.4.4-r0 |
| Chainguard | gitlab-exporter-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-exporter-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-exporter-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-exporter-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-gitaly-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-gitaly-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-logger-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-logger-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-pages-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-pages-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-rails-ce-18.1 | 0 | 18.1.6-r3 |
| Chainguard | gitlab-rails-ce-18.2 | 0 | 18.2.8-r3 |
| Chainguard | gitlab-rails-ce-18.3 | 0 | 18.3.6-r0 |
| Chainguard | gitlab-rails-ce-18.4 | 0 | 18.4.4-r0 |
| Chainguard | gitlab-rails-ce-18.5 | 0 | 18.5.2-r0 |
| Chainguard | gitlab-rails-ce-assets-18.1 | 0 | 18.1.6-r1 |
| Chainguard | gitlab-rails-ce-assets-18.2 | 0 | 18.2.8-r1 |
| Chainguard | gitlab-rails-ce-assets-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-rails-ce-assets-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-rails-ce-assets-18.5 | 0 | 18.5.1-r0 |
| Chainguard | gitlab-rails-ce-assets-fips-18.1 | 0 | 18.1.6-r2 |
| Chainguard | gitlab-rails-ce-assets-fips-18.2 | 0 | 18.2.8-r2 |
| Chainguard | gitlab-rails-ce-assets-fips-18.3 | 0 | 18.3.5-r2 |
| Chainguard | gitlab-rails-ce-assets-fips-18.4 | 0 | 18.4.3-r3 |
| Chainguard | gitlab-rails-ce-assets-fips-18.5 | 0 | 18.5.1-r2 |
| Chainguard | gitlab-rails-ce-doc-18.1 | 0 | 18.1.6-r1 |
| Chainguard | gitlab-rails-ce-doc-18.2 | 0 | 18.2.8-r1 |
| Chainguard | gitlab-rails-ce-doc-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-rails-ce-doc-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-rails-ce-doc-18.5 | 0 | 18.5.1-r0 |
| Chainguard | gitlab-rails-ce-doc-fips-18.1 | 0 | 18.1.6-r2 |
| Chainguard | gitlab-rails-ce-doc-fips-18.2 | 0 | 18.2.8-r2 |
| Chainguard | gitlab-rails-ce-doc-fips-18.3 | 0 | 18.3.5-r2 |
| Chainguard | gitlab-rails-ce-doc-fips-18.4 | 0 | 18.4.3-r3 |
| Chainguard | gitlab-rails-ce-doc-fips-18.5 | 0 | 18.5.1-r2 |
| Chainguard | gitlab-rails-ce-fips-18.1 | 0 | 18.1.6-r4 |
| Chainguard | gitlab-rails-ce-fips-18.2 | 0 | 18.2.8-r4 |
| Chainguard | gitlab-rails-ce-fips-18.3 | 0 | 18.3.6-r0 |
| Chainguard | gitlab-rails-ce-fips-18.4 | 0 | 18.4.4-r0 |
| Chainguard | gitlab-rails-ce-fips-18.5 | 0 | 18.5.2-r0 |
| Chainguard | gitlab-rails-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-rails-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-shell-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-shell-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-shell-scripts-18.3 | 0 | 18.3.6-r0 |
| Chainguard | gitlab-shell-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-sidekiq-ce-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-sidekiq-ce-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-toolbox-ce-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-toolbox-ce-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-webservice-ce-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-webservice-ce-18.4 | 0 | 18.4.3-r0 |
| Chainguard | gitlab-workhorse-scripts-18.3 | 0 | 18.3.5-r0 |
| Chainguard | gitlab-workhorse-scripts-18.4 | 0 | 18.4.3-r0 |
| Chainguard | kube-fluentd-operator | 0 | 1.18.2-r49 |
| Chainguard | kube-fluentd-operator-compat | 0 | 1.18.2-r49 |
| Chainguard | kube-fluentd-operator-default-config | 0 | 1.18.2-r49 |
| Chainguard | kube-fluentd-operator-oci-entrypoint | 0 | 1.18.2-r49 |
| Chainguard | logstash-8.17 | 0 | 8.17.10-r4 |
| Chainguard | logstash-8.17-bitnami-compat | 0 | 8.17.10-r4 |
| Chainguard | logstash-8.17-compat | 0 | 8.17.10-r4 |
| Chainguard | logstash-8.17-env2yaml | 0 | 8.17.10-r4 |
| Chainguard | logstash-8.17-iamguarded-compat | 0 | 8.17.10-r4 |
| Chainguard | logstash-8.17-with-output-opensearch | 0 | 8.17.10-r4 |
| Chainguard | logstash-8.18 | 0 | 8.18.8-r2 |
| Chainguard | logstash-8.18-bitnami-compat | 0 | 8.18.8-r2 |
| Chainguard | logstash-8.18-compat | 0 | 8.18.8-r2 |
| Chainguard | logstash-8.18-env2yaml | 0 | 8.18.8-r2 |
| Chainguard | logstash-8.18-iamguarded-compat | 0 | 8.18.8-r2 |
| Chainguard | logstash-8.18-with-output-opensearch | 0 | 8.18.8-r2 |
| Chainguard | logstash-8.19 | 0 | 8.19.5-r2 |
| Chainguard | logstash-8.19-compat | 0 | 8.19.5-r2 |
| Chainguard | logstash-8.19-env2yaml | 0 | 8.19.5-r2 |
| Chainguard | logstash-8.19-iamguarded-compat | 0 | 8.19.5-r2 |
| Chainguard | logstash-8.19-with-output-opensearch | 0 | 8.19.5-r2 |
| Chainguard | logstash-9.0 | 0 | 9.0.8-r2 |
| Chainguard | logstash-9.0-bitnami-compat | 0 | 9.0.8-r2 |
| Chainguard | logstash-9.0-compat | 0 | 9.0.8-r2 |
| Chainguard | logstash-9.0-env2yaml | 0 | 9.0.8-r2 |
| Chainguard | logstash-9.0-iamguarded-compat | 0 | 9.0.8-r2 |
| Chainguard | logstash-9.0-with-output-opensearch | 0 | 9.0.8-r2 |
| Chainguard | logstash-9.1 | 0 | 9.1.5-r2 |
| Chainguard | logstash-9.1-bitnami-compat | 0 | 9.1.5-r2 |
| Chainguard | logstash-9.1-compat | 0 | 9.1.5-r2 |
| Chainguard | logstash-9.1-env2yaml | 0 | 9.1.5-r2 |
| Chainguard | logstash-9.1-iamguarded-compat | 0 | 9.1.5-r2 |
| Chainguard | logstash-9.1-with-output-opensearch | 0 | 9.1.5-r2 |
| Chainguard | ruby3.2-rails-7.1 | 0 | 7.1.6-r0 |
| Chainguard | ruby3.2-rails-7.1-compat | 0 | 7.1.6-r0 |
| Chainguard | ruby3.2-rails-7.2 | 0 | 7.2.2.2-r2 |
| Chainguard | ruby3.2-rails-7.2-compat | 0 | 7.2.2.2-r2 |
| Chainguard | ruby3.2-rails-8.0 | 0 | 8.0.3-r2 |
| Chainguard | ruby3.2-rails-8.0-compat | 0 | 8.0.3-r2 |
| Chainguard | ruby3.3-rack-2.2 | 0 | 2.2.22-r0 |
| Chainguard | ruby3.3-rails-7.1 | 0 | 7.1.6-r0 |
| Chainguard | ruby3.3-rails-7.1-compat | 0 | 7.1.6-r0 |
| Chainguard | ruby3.3-rails-7.2 | 0 | 7.2.2.2-r2 |
| Chainguard | ruby3.3-rails-7.2-compat | 0 | 7.2.2.2-r2 |
| Chainguard | ruby3.3-rails-8.0 | 0 | 8.0.3-r2 |
| Chainguard | ruby3.3-rails-8.0-compat | 0 | 8.0.3-r2 |
| Chainguard | ruby3.4-rails-7.1 | 0 | 7.1.6-r0 |
| Chainguard | ruby3.4-rails-7.1-compat | 0 | 7.1.6-r0 |
| Chainguard | ruby3.4-rails-7.2 | 0 | 7.2.2.2-r2 |
| Chainguard | ruby3.4-rails-7.2-compat | 0 | 7.2.2.2-r2 |
| Chainguard | ruby3.4-rails-8.0 | 0 | 8.0.3-r2 |
| Chainguard | ruby3.4-rails-8.0-compat | 0 | 8.0.3-r2 |
| Mageia:9 | ruby-rack | 0 | 2.2.21-1.mga9 |
| SUSE:Linux Enterprise High Availability Extension 15 SP3 | rubygem-rack | 0 | 2.2.20-150000.3.34.1 |
| SUSE:Linux Enterprise High Availability Extension 15 SP4 | rubygem-rack | 0 | 2.2.20-150000.3.34.1 |
| SUSE:Linux Enterprise High Availability Extension 15 SP5 | rubygem-rack | 0 | 2.2.20-150000.3.34.1 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | rubygem-rack | 0 | 2.2.20-150000.3.34.1 |
| SUSE:Linux Enterprise High Availability Extension 15 SP7 | rubygem-rack | 0 | 2.2.20-150000.3.34.1 |
| Wolfi | kube-fluentd-operator | 0 | 1.18.2-r49 |
| Wolfi | kube-fluentd-operator-compat | 0 | 1.18.2-r49 |
| Wolfi | kube-fluentd-operator-default-config | 0 | 1.18.2-r49 |
| Wolfi | kube-fluentd-operator-oci-entrypoint | 0 | 1.18.2-r49 |
| Wolfi | logstash-9.1 | 0 | 9.1.5-r2 |
| Wolfi | logstash-9.1-bitnami-compat | 0 | 9.1.5-r2 |
| Wolfi | logstash-9.1-compat | 0 | 9.1.5-r2 |
| Wolfi | logstash-9.1-env2yaml | 0 | 9.1.5-r2 |
| Wolfi | logstash-9.1-iamguarded-compat | 0 | 9.1.5-r2 |
| Wolfi | logstash-9.1-with-output-opensearch | 0 | 9.1.5-r2 |
| Wolfi | ruby3.2-rails-8.0 | 0 | 8.0.3-r2 |
| Wolfi | ruby3.2-rails-8.0-compat | 0 | 8.0.3-r2 |
| Wolfi | ruby3.3-rack-2.2 | 0 | 2.2.22-r0 |
| Wolfi | ruby3.3-rails-8.0 | 0 | 8.0.3-r2 |
| Wolfi | ruby3.3-rails-8.0-compat | 0 | 8.0.3-r2 |
| Wolfi | ruby3.4-rails-8.0 | 0 | 8.0.3-r2 |
| Wolfi | ruby3.4-rails-8.0-compat | 0 | 8.0.3-r2 |
| gem | rack | 3.0 | 3.1.18 |
| gem | rack | 3.2 | 3.2.3 |
| openSUSE:Leap 15.6 | rubygem-rack | 0 | 2.2.20-150000.3.34.1 |
Related vulnerabilities
- CVE-2026-25500 Rack is a modular Ruby web server interface. Also affects rack
- CVE-2026-22860 Rack is a modular Ruby web server interface. Also affects rack
- CVE-2025-61919 Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded body parsing Also affects rack
- CVE-2025-61770 Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion) Also affects rack
- CVE-2025-61771 Rack: Multipart parser buffers large non‑file fields entirely in memory, enabling DoS… Also affects rack
- CVE-2025-61772 Rack's multipart parser buffers unbounded per-part headers, enabling DoS (memory… Also affects rack
- CVE-2025-59830 Rack has an unsafe default in Rack::QueryParser allows params_limit bypass via… Also affects rack
- CVE-2025-46336 Rack::Session is a session management implementation for Rack. Also affects rack