Rack vulnerabilities
36 known CVE vulnerabilities in Rack, translated and rated.
- CVE-2026-142594Low
Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser.parse_boundary locates boundary= as a substring anywhere in a Content-Type header instead of parsing named parameters consistently with Rack::MediaType.params, truncates quoted boundary values at delimiters, preserves surrounding whitespace, and does not correctly process quoted-pair escapes. A conforming intermediary can therefore find no boundary or a different boundary while Rack parses attacker-controlled multipart parts, allowing form fields or uploads to bypass web application firewall inspection. Exploitation requires an intermediary that inspects multipart bodies using a conforming parser, and Rack itself grants no capability beyond a well-formed request carrying the same body. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.
- CVE-2026-142593Medium
Rack is a modular Ruby web server interface. From 2.2.0 until 2.2.26, 3.1.24, and 3.2.9, Rack::Directory#get checks a path containing dot-dot segments with File.expand_path but then passes the original unnormalized path to File.stat and Dir.foreach instead of first applying Utils.clean_path_info. When a directory beneath the served root is a symbolic link followed by .., the OS resolves the link before applying the dot-dot segment, allowing an unauthenticated request to list the target's parent or siblings outside the root.
- CVE-2026-142592High
Rack is a modular Ruby web server interface. From 3.0.0 until 3.1.24 and 3.2.9, the multipart parser calls Encoding.find for every unknown charset parameter without checking Encoding.name_list first, allowing an unauthenticated attacker to exhaust a worker thread by sending thousands of unknown charset parameters in a small multipart request.
- CVE-2026-142591Medium
Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regex engine to allocate approximately 48 bytes of backtracking state per input character. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory.
- CVE-2026-142590Medium
Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser incompletely prevents CR and LF characters from multipart part headers from reaching parsed values. In Rack 3.1.16 and later and Rack 3.2, folded Content-ID values can become parameter names when Content-Disposition is missing or exceeds CONTENT_DISPOSITION_MAX_BYTES. In Rack 2.2, quoted name or filename values and Content-Type values can match across line breaks. Applications that reuse these parameter names or uploaded-file content types in response headers, log lines, or other CRLF-delimited contexts may permit header injection, response splitting, or log forgery.
- CVE-2026-125111High
In Rack prior to 2.2.25, 3.1.23, and 3.2.8, Rack::Multipart::Parser can retain parsed data in its internal StringScanner buffer when reads end inside or immediately after multipart headers. An unauthenticated attacker can align many small parts with rack.multipart.buffer_size boundaries so the buffer grows with the request despite per-field, header, and preamble limits, causing a worker to exhaust memory.
- CVE-2026-125110Medium
Rack is a modular Ruby web server interface. Prior to 2.2.25, 3.1.23, and 3.2.8, Rack::Static serves a path after Utils.clean_path_info normalization but evaluates header_rules against a path that is only URL-decoded. An unauthenticated attacker can request a known file through raw or percent-encoded dot segments and receive it without path-specific security headers such as Content-Disposition or Content-Security-Policy.
- CVE-2026-125109Medium
Rack is a modular Ruby web server interface. From 3.0 until 3.1.23 and 3.2.8, Rack::Request#host_with_port, #base_url, and #url can return an attacker-controlled invalid authority from Host, X-Forwarded-Host, or Forwarded: host= verbatim. Applications without an independent host allowlist using these methods for absolute URLs, redirects, or origin checks can emit attacker-chosen delimiters.
- CVE-2026-125108Low
In Rack, Rack::Multipart::Parser.parse_boundary can skip a leading empty or quoted boundary parameter in a multipart Content-Type header and accept a later parameter. Rack can therefore parse a request body with a boundary a conforming intermediary would not derive, allowing form fields or file uploads to reach an application without intended proxy or WAF inspection. The issue is fixed in versions 2.2.25, 3.1.23, and 3.2.8.
- CVE-2026-34835Medium
Rack::Request incorrectly parses the Host header, accepting characters like /, ?, #, and @ that are not allowed in RFC-compliant hostnames. The req.host method returns the full unvalidated value, allowing bypass of host validation based on simple prefix or suffix checks.
- CVE-2026-34827High
Rack versions from 3.0.0.beta1 to 3.1.20 and 3.2.0 to 3.2.5 have a DoS vulnerability in the multipart parser. An unauthenticated attacker can send a crafted multipart/form-data request with many parts containing long escaped parameter values, causing excessive CPU usage during parsing.
- CVE-2026-32762Medium
Rack before versions 3.1.21 and 3.2.6 incorrectly parses the Forwarded header (RFC 7239) by splitting on semicolons before handling quoted-string values. Since quoted values may contain semicolons, the header can be interpreted as multiple Forwarded directives, allowing attackers to smuggle host, proto, for, or by parameters.
- CVE-2026-26962Medium
Rack::Multipart::Parser incorrectly unfolds folded multipart headers, preserving CRLF in parameter values. This can lead to header injection or HTTP response splitting in applications using these values.
- CVE-2026-34831Medium
In the Rack library (modular Ruby web server interface) versions prior to 2.2.23, 3.1.21, and 3.2.6, the Rack::Files#fail method sets the Content-Length header using String#size instead of String#bytesize. When the response body contains multibyte UTF-8 characters, the declared length is smaller than the actual bytes sent. An attacker can trigger this mismatch by requesting a non-existent path with percent-encoded UTF-8 characters, leading to incorrect HTTP response framing and potential response desynchronization in deployments relying on the wrong Content-Length value.
- CVE-2026-34830Medium
In Rack prior to versions 2.2.23, 3.1.21, and 3.2.6, a vulnerability was found in Rack::Sendfile#map_accel_path. Injecting the X-Accel-Mapping header into a regular expression without proper escaping allows an attacker to control the X-Accel-Redirect header, potentially leading to serving unauthorized files via nginx.
- CVE-2026-34829High
Rack prior to versions 2.2.23, 3.1.21, and 3.2.6 does not limit the size of data in multipart/form-data requests without a Content-Length header. An attacker can send an arbitrarily large file, causing disk space exhaustion and denial of service (DoS).
- CVE-2026-34826Medium
Rack before versions 2.2.23, 3.1.21, and 3.2.6 has a denial of service vulnerability due to an unlimited number of byte ranges in the HTTP Range header. An attacker can supply many small overlapping ranges, causing disproportionate CPU, memory, I/O, and bandwidth consumption.
- CVE-2026-34786Medium
Rack::Static incorrectly evaluates header rules on the raw URL-encoded PATH_INFO, while the file is served after decoding. A request for an encoded variant of a path can bypass the intended security headers.
- CVE-2026-34785High
Rack versions before 2.2.23, 3.1.21, and 3.2.6 improperly validate URL prefixes in Rack::Static, potentially leading to unauthorized static file serving and information disclosure.
- CVE-2026-34763Medium
Rack::Directory interpolates the configured root path directly into a regular expression when deriving the displayed directory path. If the root contains regex metacharacters such as +, *, or ., the prefix stripping can fail and the generated directory listing may expose the full filesystem path in the HTML output.
- CVE-2026-34230Medium
In the Rack interface (versions before 2.2.23, 3.1.21, and 3.2.6), a DoS vulnerability exists in the Rack::Utils.select_best_encoding method. An unauthenticated attacker can send a request with a crafted Accept-Encoding header, causing excessive CPU consumption by Rack::Deflater.
- CVE-2026-26961Low
A multipart content smuggling vulnerability was found in Rack (Ruby) before versions 2.2.23, 3.1.21, and 3.2.6. Rack selects the last boundary parameter instead of the first, which can bypass WAF filters.
- CVE-2026-25500Medium
Rack, a modular Ruby web server interface, prior to versions 2.2.22, 3.1.20, and 3.2.5, generates an HTML directory index where each file entry is a clickable link. If a file exists on disk whose basename starts with the javascript: scheme (e.g., javascript:alert(1)), the generated anchor's href is exactly javascript:alert(1), allowing JavaScript execution when clicked.
- CVE-2026-22860High
A vulnerability in the Rack library allows bypassing directory access restrictions through path manipulation. The `Rack::Directory` path check uses a prefix match, enabling access outside the configured root, e.g., via a request like `/../root_example/`. The issue is fixed in versions 2.2.22, 3.1.20, and 3.2.5.
- CVE-2025-61919High
Rack versions prior to 2.2.20, 3.1.18, and 3.2.3 reads the entire request body into memory for Content-Type: application/x-www-form-urlencoded, calling rack.input.read(nil) without enforcing a length or cap. Large request bodies can therefore be buffered completely into process memory before parsing, leading to denial of service through memory exhaustion.
- CVE-2025-61780Medium
An information disclosure vulnerability in Rack::Sendfile when running behind a proxy that supports x-sendfile headers (e.g., Nginx). Specially crafted x-sendfile-type and x-accel-mapping headers are interpreted as proxy configuration directives, potentially triggering unintended internal requests that bypass proxy-level access restrictions.
- CVE-2025-61772High
A vulnerability in Rack (versions prior to 2.2.19, 3.1.17, and 3.2.2) in Rack::Multipart::Parser. When a multipart part's header block never terminates with the required blank line (CRLFCRLF), the parser appends incoming bytes to memory without a size cap. A remote attacker can send incomplete multipart headers to exhaust memory and cause a denial of service (DoS) via process termination (OOM) or severe slowdown.
- CVE-2025-61771High
In Rack before versions 2.2.19, 3.1.17, and 3.2.2, Rack::Multipart::Parser stores non-file form fields (parts without a filename) entirely in memory as Ruby String objects. A single large text field in a multipart/form-data request can consume equivalent process memory, potentially leading to out-of-memory (OOM) conditions and denial of service.
- CVE-2025-61770High
A vulnerability in Rack (versions prior to 2.2.19, 3.1.17, and 3.2.2) in Rack::Multipart::Parser. The parser buffers the entire multipart preamble (bytes before the first boundary) in memory without any size limit. A client can send a large preamble, causing significant memory use and potential process termination due to out-of-memory (OOM) conditions.
- CVE-2025-59830High
In Rack before version 2.2.18, Rack::QueryParser enforces its params_limit only for parameters separated by '&', while still splitting on both '&' and ';'. Attackers could use ';' separators to bypass the parameter count limit and submit more parameters than intended.
- CVE-2025-49007Medium
Rack, a modular Ruby web server interface, starting in version 3.1.0 and prior to 3.1.16, has a denial of service vulnerability in the Content-Disposition parsing component. Crafted input can cause Content-Disposition header parsing to take an unexpected amount of time, potentially resulting in a DoS attack vector. This affects applications parsing multipart posts using Rack (virtually all Rails applications); version 3.1.16 contains a patch.
- CVE-2025-46727High
Rack, a modular Ruby web server interface, prior to versions 2.2.14, 3.0.16, and 3.1.14 does not limit the number of parameters when parsing query strings and application/x-www-form-urlencoded bodies. An attacker can send a request with an extremely large number of parameters, causing memory and CPU exhaustion and denial of service.
- CVE-2025-32441Medium
Rack is a modular Ruby web server interface. Prior to version 2.2.14, when using the Rack::Session::Pool middleware, simultaneous requests can restore a deleted session, allowing an unauthenticated user to occupy that session. An attacker could exploit a session race condition to retain illicit access even after a user logs out.
- CVE-2025-27610High
A vulnerability in the Rack library (Ruby) involves improper path validation in Rack::Static, allowing path traversal and access to files outside the designated static directory. Patched versions are 2.2.13, 3.0.14, and 3.1.12.
- CVE-2025-27111High
Rack, a modular Ruby web server interface, logs unsanitised header values from the X-Sendfile-Type header in the Rack::Sendfile middleware. An attacker can inject escape sequences (e.g., newline characters) into the header, causing log injection. This is fixed in 2.2.12, 3.0.13, and 3.1.11.
- CVE-2023-27530High
A DoS vulnerability exists in Rack <v3.0.4.2, <v2.2.6.3, <v2.1.4.3 and <v2.0.9.3 within the Multipart MIME parsing code, allowing an attacker to craft requests that cause multipart parsing to take longer than expected.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

