Skip to main content

Rack CVE-2026-34785

| EUVDEUVD-2026-18382 HIGH
Partial String Comparison (CWE-187)
2026-04-02 security-advisories@github.com GHSA-h2jq-g4cq-5ppq
7.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Request path with static prefix substring
  2. Exploit
    Rack::Static prefix check matches unintended path
  3. Execution
    Serve unrelated static file
  4. Impact
    Disclose sensitive information

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

Rack versions prior to 2.2.23, 3.1.21, or 3.2.6 with Rack::Static configured with URL prefixes (e.g., '/css'). Remote unauthenticated attacker can request unrelated paths sharing the prefix (e.g., '/css-config.env') to access unintended static files. No victim interaction required.

Impact

This represents a genuine medium-to-high priority vulnerability despite the 7.5 CVSS score. The CVSS vector indicates worst-case scenario with network attack vector (AV:N), low complexity (AC:L), no privileges required (PR:N), and high confidentiality impact (C:H). However, real-world exploitability depends heavily on configuration choices and file naming conventions at the document root. The vulnerability requires specific conditions: administrators must configure Rack::Static with short prefix strings AND sensitive files must exist with names sharing those prefixes. EPSS data not provided, but the straightforward nature of exploitation (simple path manipulation) and confirmed patch availability suggest moderate real-world risk. No CISA KEV listing indicates no confirmed active exploitation campaigns. The information disclosure nature limits immediate system compromise but could enable reconnaissance for multi-stage attacks. Organizations using Rack for static file serving with prefix-based configuration should prioritize remediation, while those using different static serving approaches or full path specifications face minimal risk.

Exploit ScenarioDerived

An attacker identifies a Ruby web application using Rack::Static configured to serve CSS files from '/css'. They enumerate common sensitive file patterns by requesting paths like '/css-config.env', '/css-backup.sql', '/css.env.production', or '/cssadmin.json'. If any files matching these patterns exist in the static root directory, Rack::Static incorrectly serves them due to the flawed prefix check. The attacker successfully retrieves database credentials from '/css-backup.sql' or API keys from '/css-config.env', gaining authentication credentials for backend systems. This information disclosure enables lateral movement or privilege escalation in subsequent attack stages.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Apr 02, 2026

Information disclosure in Rack web server interface (versions <2.2.23, <3.1.21, <3.2.6) allows unauthenticated remote attackers to access sensitive files due to flawed prefix matching in Rack::Static. The vulnerability enables access to unintended files sharing configured URL prefixes (e.g., '/css' matching '/css-backup.sql'), exposing configuration files, database backups, or environment variables. CVSS 7.5 (High) with network vector and no complexity. No public exploit identified at time of analysis.

RemediationAI

Upgrade Rack to patched versions immediately: version 2.2.23 for 2.x deployments, version 3.1.21 for 3.1.x deployments, or version 3.2.6 for 3.2.x deployments. Update the Rack gem dependency in your Gemfile or gemspec and run bundle update rack to apply the fix. After upgrading, review Rack::Static configuration to ensure prefix strings include trailing slashes ('/css/' instead of '/css') as a defense-in-depth measure, though the patch corrects the underlying matching logic. Organizations unable to upgrade immediately should audit static file root directories for sensitive files with names that could match configured prefixes and relocate or remove such files. Review web server logs for suspicious access patterns to files outside intended static directories. Consult the GitHub security advisory at https://github.com/rack/rack/security/advisories/GHSA-h2jq-g4cq-5ppq for official remediation guidance and any additional workarounds.

Affected VersionsENISA

rack 3.2.0, < 3.2.6
rack < 2.2.23
rack 3.0.0.beta1, < 3.1.21

Affected Packages

rubygems rack fix: 2.2.23, 3.1.21, 3.2.6
euvd rack_3_0_0_beta1 fix: 3.1.21

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in rubygems, euvd

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

Technical ContextAI · show details

Rack is a minimal Ruby web server interface that sits between web servers and Ruby frameworks. The Rack::Static middleware component serves static assets by matching request paths against configured URL prefixes. The vulnerability stems from CWE-187 (Representation Error), specifically an improper string prefix check that uses simple begins-with logic rather than path boundary validation. When administrators configure static file serving with prefixes like '/css', the middleware incorrectly matches any path starting with those characters ('/css-config.env', '/css-backup.sql', '/cssadmin') rather than limiting matches to the intended directory structure ('/css/'). This allows traversal beyond intended static directories when filenames in the document root happen to share the prefix string. The flaw affects the core static file serving logic across multiple Rack major versions, impacting any Ruby web application using Rack::Static with prefix-based routing.

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

Vendor (github) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
SUSE HIGH
Red Hat 7.5 HIGH

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

2
Patch released
Apr 03, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 02, 2026 - 17:16 nvd
HIGH 7.5

DescriptionCVE.org

Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Static determines whether a request should be served as a static file using a simple string prefix check. When configured with URL prefixes such as "/css", it matches any request path that begins with that string, including unrelated paths such as "/css-config.env" or "/css-backup.sql". As a result, files under the static root whose names merely share the configured prefix may be served unintentionally, leading to information disclosure. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.

Executive ViewAI

Why It Matters

Rack web server versions below 2.2.23, 3.1.21, and 3.2.6 contain a critical information disclosure vulnerability that allows unauthenticated attackers to access sensitive files such as database backups and configuration data through a flaw in URL prefix matching. Organizations using vulnerable Rack versions face immediate risk of credential exposure and operational data leakage without authentication barriers. This affects any production application relying on Rack's static file serving with similarly-named URL paths.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or restrict access to Rack::Static for sensitive URL prefixes; (2) Implement reverse proxy rules (nginx/Apache) to explicitly deny requests to unintended file paths (e.g., block access to '/css-backup.sql' if only '/css' directory is intended); (3) Relocate sensitive files outside web-accessible directories; (4) Apply network-level access controls to restrict exposure to trusted networks only; (5) Monitor access logs for suspicious pattern matching attempts. Prioritize patch release surveillance from Rack maintainers.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
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.

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

SUSE

Severity: High
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 16.1 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed

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