Several critical vulnerabilities have been identified in Rack, a core component for Ruby web applications. These vulnerabilities range from parameter bypass and session restoration issues to header injection and denial-of-service risks. Patches are now available, and immediate action is recommended to mitigate potential exploitation.
The CVSS scores for these vulnerabilities range from 4.2 to 7.5, indicating a range of moderate to high severity, reflecting the potential impact and exploitability.
What is Rack?
Rack: Query Parameter Bypass
High severity due to potential denial-of-service.
Rack's `QueryParser` incorrectly enforces its `params_limit` only for parameters separated by '&', allowing attackers to bypass the limit using semicolons. This enables submission of more parameters than intended.
How to fix CVE-2025-59830 in Rack
Patch immediately- 1.Update Rack to version 2.2.18 or later.
gem update rackVerify with:
gem list rackWorkaround: Configure `QueryParser` with an explicit delimiter (e.g., '&') or enforce query string limits at the web server level.
NextGuard automatically flags CVE-2025-59830 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Session Restoration After Deletion
Moderate severity due to potential session hijacking.
Concurrent requests using `Rack::Session::Pool` can restore a deleted rack session, allowing unauthenticated users to potentially occupy that session.
How to fix CVE-2025-32441 in Rack
Patch immediately- 1.Update Rack to version 2.2.14 or later.
- 2.Ensure session invalidation is atomic.
gem update rackVerify with:
gem list rackWorkaround: Implement a `logged_out` flag and check it on every request, or use a custom session store with invalidation timestamps.
NextGuard automatically flags CVE-2025-32441 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: X-Accel-Redirect Regex Injection
Moderate severity due to potential unauthorized file disclosure.
Rack's `X-Accel-Mapping` header interpolation in `Rack::Sendfile` is vulnerable to regex injection, allowing attackers to control the `X-Accel-Redirect` response header and potentially serve unintended files.
How to fix CVE-2026-34830 in Rack
Patch immediately- 1.Update Rack to version 2.2.23 or later.
- 2.Strip or overwrite `X-Accel-Mapping` headers at the reverse proxy.
gem update rackVerify with:
gem list rackWorkaround: Prefer explicit sendfile mappings and review proxy configurations.
NextGuard automatically flags CVE-2026-34830 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Content-Length Mismatch in Error Responses
Moderate severity due to potential response framing issues.
Rack's error responses use an incorrect `Content-Length` header due to using `String#size` instead of `String#bytesize` for multibyte UTF-8 characters, leading to response desynchronization.
How to fix CVE-2026-34831 in Rack
Patch immediately- 1.Update Rack to version 2.2.23 or later.
gem update rackVerify with:
gem list rackWorkaround: Enforce query string and request size limits at the web server or proxy layer.
NextGuard automatically flags CVE-2026-34831 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Static Header Rules Bypass
Moderate severity due to potential header bypass.
URL-encoded paths can bypass `Rack::Static` header rules, allowing attackers to access static content without the intended headers.
How to fix CVE-2026-34786 in Rack
Patch immediately- 1.Update Rack to version 2.2.23 or later.
gem update rackVerify with:
gem list rackWorkaround: Prefer setting security headers at the reverse proxy layer.
NextGuard automatically flags CVE-2026-34786 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Unbounded Multipart Uploads
High severity due to potential denial of service.
Rack's multipart parsing without a `Content-Length` header allows unbounded chunked file uploads, leading to denial of service.
How to fix CVE-2026-34829 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Enforce request body size limits at the reverse proxy.
NextGuard automatically flags CVE-2026-34829 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Static Prefix Matching
High severity due to potential information disclosure.
Rack's static prefix matching can expose unintended files under the static root due to a simple string prefix check.
How to fix CVE-2026-34785 in Rack
Patch immediately- 1.Update Rack to version 2.2.23 or later.
gem update rackVerify with:
gem list rackWorkaround: Avoid placing sensitive files under the static root.
NextGuard automatically flags CVE-2026-34785 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Encoding Selection Denial of Service
Moderate severity due to potential denial of service.
Rack's encoding selection logic exhibits quadratic complexity with wildcard `Accept-Encoding` headers, leading to denial of service.
How to fix CVE-2026-34230 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Apply request filtering or header restrictions at the reverse proxy.
NextGuard automatically flags CVE-2026-34230 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Multipart Header Parsing Denial of Service
High severity due to potential denial of service.
Rack's multipart header parsing exhibits quadratic complexity with escape-heavy quoted parameters, leading to denial of service.
How to fix CVE-2026-34827 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Apply request throttling or rate limiting to multipart endpoints.
NextGuard automatically flags CVE-2026-34827 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Multipart Byte Range Processing Denial of Service
High severity due to potential denial of service.
Rack's multipart byte range processing allows denial of service via excessive overlapping ranges.
How to fix CVE-2026-34826 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Apply request filtering or header restrictions at the reverse proxy.
NextGuard automatically flags CVE-2026-34826 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Static Header Rules Bypass
High severity due to potential information disclosure.
Rack's static header rules bypass allows unauthorized access to files under the static root.
How to fix CVE-2026-34785 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Avoid placing sensitive files under the static root.
NextGuard automatically flags CVE-2026-34785 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Multipart Byte Range Processing Denial of Service
High severity due to potential denial of service.
Rack's multipart byte range processing allows denial of service via excessive overlapping ranges.
How to fix CVE-2026-34826 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Apply request filtering or header restrictions at the reverse proxy.
NextGuard automatically flags CVE-2026-34826 if [Rack] appears in any of your monitored projects — no manual lookup required.
Rack: Static Header Rules Bypass
Moderate severity due to potential header bypass.
URL-encoded paths can bypass `Rack::Static` header rules, allowing attackers to access static content without the intended headers.
How to fix CVE-2026-34786 in Rack
Patch immediately- 1.Update Rack to version 3.1.21 or later.
gem update rackVerify with:
gem list rackWorkaround: Prefer setting security headers at the reverse proxy layer.
NextGuard automatically flags CVE-2026-34786 if [Rack] appears in any of your monitored projects — no manual lookup required.
Stay ahead of Ruby vulnerabilities
Proactively identify and address security risks in your Ruby projects. NextGuard provides comprehensive dependency scanning and vulnerability monitoring to keep your applications secure.
Compare your dependenciesFrequently asked questions
These newly disclosed vulnerabilities in Rack highlight the importance of maintaining up-to-date dependencies and implementing robust security practices. Ensure you update Rack to the latest version and review your application's configuration to mitigate potential risks. See all ruby vulnerabilities on NextGuard.
Related topics