Skip to main content

Rack CVE-2025-61780

MEDIUM
Information Exposure (CWE-200)
2025-10-10 security-advisories@github.com
5.3
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send request with crafted x-sendfile-type header
  2. Exploit
    Inject x-accel-mapping directive
  3. Execution
    Trigger proxy internal X-Accel-Redirect
  4. Impact
    Access protected internal endpoints

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitable only when ALL of the following hold: (1) the application uses Rack::Sendfile middleware behind a proxy that honors x-accel-redirect, specifically Nginx; (2) the proxy is NOT configured to always set or strip the client-supplied 'x-sendfile-type' and 'x-accel-mapping' request headers (i.e., it passes them through from the client); and (3) the application exposes at least one endpoint whose response body responds to .to_path, qualifying it for sendfile acceleration. The attack is remote and unauthenticated (PR:N) but tightly limited by this non-default header-passthrough configuration - correctly configured proxies that strip or pin these headers, applications not using Rack::Sendfile, or versions >= 2.2.20/3.1.18/3.2.3 (which ignore the request header and require explicit 'use Rack::Sendfile, "x-accel-redirect"' configuration) are not exploitable. Impact is limited to disclosure/access of protected internal routes, not arbitrary file read.

Impact

This is a genuine but conditional, moderate-risk issue - not a top-priority emergency. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N, base 5.3) models a network-reachable, unauthenticated attack with only limited confidentiality impact and no integrity or availability impact, which matches the advisory's statement that it exposes protected routes but does NOT permit arbitrary file reads. However, the low-complexity rating (AC:L) understates reality: the advisory and source diff confirm exploitation requires a specific stack (Rack::Sendfile behind an x-accel-redirect-capable proxy such as Nginx), a proxy that fails to set/strip the x-sendfile-type and x-accel-mapping headers, and an app endpoint whose body responds to .to_path - so a more honest complexity is high. All corroborating-threat signals point to low urgency: EPSS is 0.55% (45th percentile), there is no CISA KEV listing, and no public exploit code is referenced in the inputs. No SSVC decision data was provided. The signals are internally consistent (low EPSS, no KEV, limited scalar impact), so this is best treated as a patch-in-normal-cycle hygiene item rather than an actively-exploited threat - prioritize it where the vulnerable Nginx/Rack::Sendfile configuration is actually present.

Exploit ScenarioDerived

An attacker sends an HTTP request to a Rack application sitting behind Nginx, injecting a crafted 'x-sendfile-type: x-accel-redirect' header together with a crafted 'x-accel-mapping' header, and targets a path that qualifies for proxy-based acceleration. Rack::Sendfile trusts these client-supplied headers as proxy configuration and emits an X-Accel-Redirect response, causing Nginx to reissue an internal request that bypasses its access controls and reaches administrative or otherwise protected routes. No public exploit code is identified in the provided data, and success depends on the proxy not stripping these headers.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Header-driven middleware confusion in Rack::Sendfile lets remote attackers piggyback on a proxy's x-accel-redirect handling to reach internal routes that the proxy's access controls were supposed to block. Only deployments that combine Rack::Sendfile, an Nginx-style proxy honoring x-accel-redirect, and a proxy that fails to set or strip client-supplied x-sendfile-type/x-accel-mapping headers (and that expose an endpoint whose body responds to .to_path) are affected - correctly configured proxies and versions 2.2.20, 3.1.18, and 3.2.3 are not exploitable. Exposure is limited to disclosure/access of protected routes such as admin pages, not arbitrary file read; no public exploit code or confirmed active exploitation was identified at time of analysis, and EPSS is low at 0.55% (45th percentile).

RemediationAI

Vendor-released patch: upgrade to Rack 2.2.20 for the 2.x line, 3.1.18 for 3.0/3.1, or 3.2.3 for 3.2 - the same releases also fix CVE-2025-61919 (unbounded form-parsing read), so a single upgrade addresses both. Patched code no longer honors the client's x-sendfile-type header; x-accel-redirect must be opted into explicitly with use Rack::Sendfile, "x-accel-redirect" in the middleware stack, with the trade-off that any deployment relying on header-driven configuration will silently lose sendfile acceleration until that constructor argument is added. Where upgrading is not immediately possible, fix the proxy instead: Nginx should pin or strip the headers, e.g. proxy_set_header x-sendfile-type x-accel-redirect; and proxy_set_header x-accel-mapping /var/www/=/files/; (or blank both with proxy_set_header x-sendfile-type ""; and proxy_set_header x-accel-mapping "";) - the side effect is that legitimate internal path mappings must then live in the proxy config rather than the application. Rails applications can bypass the middleware entirely with config.action_dispatch.x_sendfile_header = nil, at the cost of losing proxy-offloaded file serving and pushing static-file delivery back onto the app or a dedicated location. Fix commits are 57277b7741581fa827472c5c666f6e6a33abd784, 7e69f65eefe9cd2868df9f9f3b0977b86f93523a, and fba2c8bc63eb787ff4b19bc612d315fda6126d85.

Affected Packages

rubygems rack fix: 2.2.20, 3.1.18, 3.2.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Rack is the modular Ruby web-server interface that underpins Rails and most Ruby web frameworks. Its Rack::Sendfile middleware implements the offloading pattern where the application returns a body object responding to .to_path and the front-end proxy (Nginx via X-Accel-Redirect, Apache mod_xsendfile, Lighttpd) performs the actual file delivery, avoiding a Ruby-side read. Because the middleware historically derived its 'variation' from three sources - the constructor argument, env['sendfile.type'], and the raw client header HTTP_X_SENDFILE_TYPE - an attacker could assert x-sendfile-type: x-accel-redirect and supply their own x-accel-mapping to redefine the internal-to-external path mapping. The middleware would then emit an X-Accel-Redirect response that Nginx re-issues as a fresh internal subrequest, which is evaluated outside the location-level access rules that protected the original request. The root cause class is CWE-200 (exposure of sensitive information) via trust of attacker-controlled configuration input; the upstream fix removes the client header as a variation source entirely, gates use of HTTP_X_ACCEL_MAPPING on x-accel-redirect having been explicitly enabled in the constructor AND no application-level mappings being configured, and anchors the mapping substitution regex with \A instead of ^ to prevent embedded-prefix matches. Note the scoring divergence: NVD rates this 5.3 with AC:L, while our assessment scores AC:H because the header-passthrough misconfiguration is a non-default, tightly bounded prerequisite.

Know when Rack gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
vuln.today AI 3.7 LOW

Remote and unauthenticated (AV:N/PR:N), but AC:H because exploitation depends on a specific non-default proxy header-passthrough plus a .to_path endpoint; only limited route disclosure, so C:L, I:N, A:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 5.8 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

DescriptionNVD

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.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Prevalence
High
Rack underpins nearly all Ruby/Rails web applications; very wide deployment base
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)NVD

cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*
cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*
cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*

More in Rack

View all
CVE-2026-22860 HIGH POC
7.5 Feb 18

Directory traversal in Rack versions prior to 2.2.22, 3.1.20, and 3.2.5 allows unauthenticated remote attackers to list

CVE-2024-26141 HIGH POC
7.5 Feb 29

Rack is a modular Ruby web server interface. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable,

CVE-2024-25126 HIGH POC
7.5 Feb 29

Rack is a modular Ruby web server interface. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable,

CVE-2020-8184 HIGH POC
7.5 Jun 19

A reliance on cookies without validation/integrity check security vulnerability exists in rack < 2.2.3, rack < 2.1.4 tha

CVE-2022-30123 CRITICAL
10.0 Dec 05

A sequence injection vulnerability exists in Rack <2.0.9.1, <2.1.4.1 and <2.2.3.1 which could allow is a possible shell

CVE-2025-25184 MEDIUM POC
5.7 Feb 12

Rack provides an interface for developing web applications in Ruby. Rated medium severity (CVSS 5.7), this vulnerability

CVE-2026-25500 MEDIUM POC
5.4 Feb 18

Rack's Directory module fails to sanitize filenames when generating HTML directory listings, allowing attackers to craft

CVE-2026-39324 CRITICAL
9.3 Apr 07

Session authentication bypass in Rack::Session::Cookie 2.0.0 through 2.1.1 allows unauthenticated remote attackers to fo

CVE-2020-8161 HIGH
8.6 Jul 02

A directory traversal vulnerability exists in rack < 2.2.0 that allows an attacker perform directory traversal vulnerabi

CVE-2013-0263 MEDIUM
5.1 Feb 08

Rack::Session::Cookie in Rack 1.5.x before 1.5.2, 1.4.x before 1.4.5, 1.3.x before 1.3.10, 1.2.x before 1.2.8, and 1.1.x

CVE-2023-27530 HIGH
7.5 Mar 10

A DoS vulnerability exists in Rack <v3.0.4.2, <v2.2.6.3, <v2.1.4.3 and <v2.0.9.3 within in the Multipart MIME parsing co

CVE-2025-61772 HIGH
7.5 Oct 07

Memory exhaustion denial of service in the Ruby Rack web server interface (versions prior to 2.2.19, 3.1.17, and 3.2.2)

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy