CVE-2026-34785: Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching
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.
Security readout for executives and security teams
Plain-English summary
Rack can accidentally publish files from an application’s static file directory when URL prefixes are configured too broadly. A path intended for assets like “/css” may also match unrelated filenames that begin the same way. The business risk is unintended disclosure of files such as backups, configuration fragments, or other sensitive material stored under the static root.
Executive priority
Prioritize remediation for internet-facing Ruby applications and any environment where static directories may contain operational files. The issue does not indicate system takeover, but accidental disclosure of secrets or backups can materially worsen incident impact.
Technical view
Affected Rack versions use simple string prefix matching in Rack::Static. Configured prefixes such as “/css” can match other request paths beginning with the same string, causing matching files under the static root to be served unintentionally. The issue is confidentiality-only with CVSS 7.5 and is patched in Rack 2.2.23, 3.1.21, and 3.2.6.
Likely exposure
Ruby applications using Rack::Static on affected Rack versions are exposed when static roots contain sensitive files whose names share configured URL prefixes.
Exploitation context
The source bundle rates this as network-reachable, low complexity, unauthenticated, and no user interaction. KEV is false, and no provided source states active exploitation.
Researcher notes
Map findings to CWE-187, CWE-200, and CWE-552. Focus validation on Rack::Static configuration, affected version ranges, and static root contents. Do not assume exploitation without external evidence; the supplied KEV status is false.
Mitigation direction
Upgrade Rack to 2.2.23, 3.1.21, 3.2.6, or later as applicable.
Review Rack::Static URL prefix configuration for ambiguous or overly broad prefixes.
Remove secrets, backups, database dumps, and configuration files from static roots.
Check Red Hat or distribution guidance for packaged Rack remediation status.
Add deployment checks preventing sensitive file types in public static directories.
Validation and detection
Inventory applications using Rack::Static and record resolved Rack versions.
Confirm dependency manifests resolve to a patched Rack release.
Review static roots for sensitive filenames sharing configured URL prefixes.
Review application and web logs for suspicious requests to sensitive-looking static paths.
Verify public routes serve only intended static assets after remediation.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-187: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
CWE-200: Information exposure and cloud metadata lookup
Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-187 · source CWE mapping
Partial String Comparison
Partial String Comparison represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Exposure of Sensitive Information to an Unauthorized Actor
Exposure of Sensitive Information to an Unauthorized Actor represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Files or Directories Accessible to External Parties
Files or Directories Accessible to External Parties represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.