CVE-2026-34785: 
Ruby vulnerability analysis and mitigation

Overview

CVE-2026-34785 is an information disclosure vulnerability in Rack, the modular Ruby web server interface, caused by a flawed prefix-matching implementation in Rack::Static. When configured with URL prefixes such as /css, the middleware matches any request path beginning with that string — including unrelated paths like /css-config.env or /css-backup.sql — potentially serving sensitive files unintentionally. Affected versions are Rack < 2.2.23, >= 3.0.0.beta1 and < 3.1.21, and >= 3.2.0 and < 3.2.6. The vulnerability was published on April 1–2, 2026, and carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, Github Advisory).

Technical details

The root cause is a partial string comparison flaw (CWE-187) in Rack::Static#route_file, which uses logic equivalent to @urls.any? { |url| path.index(url) == 0 } — checking only whether the request path starts with the configured prefix, without enforcing a path segment boundary (i.e., a trailing /). This means a configuration of urls: ["/css", "/js"] intended to serve only files within those directories will also match sibling files like /css-config.env, /css-backup.sql, or /csssecrets.yml if they exist under the static root, resulting in unauthorized exposure of sensitive information (CWE-200). Exploitation requires no authentication, no special privileges, and no user interaction — an attacker simply crafts an HTTP GET request to a path that shares the configured prefix (GitHub Advisory).

Impact

Successful exploitation allows unauthenticated remote attackers to retrieve files from the configured static root that were never intended to be publicly accessible. Exposed content may include environment files (.env), database backups (.sql), YAML configuration files containing credentials, API keys, or other secrets. The impact is limited to confidentiality — there is no integrity or availability impact — but credential exposure could enable further lateral movement or account compromise in downstream systems (Github Advisory, GitHub Advisory).

Exploitability

No public proof-of-concept exploit code has been identified, and there is no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.049% (16th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, the attack requires no authentication and low complexity, making it straightforward to exploit opportunistically if sensitive files are present under the static root.

Exploitation steps

  1. Reconnaissance: Identify web applications built on Ruby/Rack (e.g., Rails, Sinatra) that use Rack::Static middleware with configured URL prefixes such as /css, /js, or /assets.
  2. Enumerate static root contents: Guess or enumerate filenames under the static root that share the configured prefix but are not intended to be public (e.g., /css-config.env, /css-backup.sql, /js-secrets.yml).
  3. Craft malicious HTTP request: Send a simple HTTP GET request to the target server using a path that matches the prefix but points to a sensitive file, e.g., GET /css-config.env HTTP/1.1.
  4. Receive sensitive file contents: If the file exists under the static root, Rack::Static forwards the request to the file server and returns the file contents in the HTTP response, potentially exposing credentials, database connection strings, or backup data (GitHub Advisory).

Indicators of compromise

  • Network: Unusual HTTP GET requests to paths that share a configured static URL prefix but do not correspond to expected static assets (e.g., GET /css-config.env, GET /js-backup.sql, GET /assets-secrets.yml).
  • Logs: Web server or Rack access logs showing 200 OK responses for requests to non-standard file extensions (.env, .sql, .yml, .bak) under paths matching configured static prefixes.
  • File System: Presence of sensitive files (environment files, SQL dumps, YAML configs) under the directory configured as the Rack::Static root (e.g., public/).

Mitigation and workarounds

Upgrade Rack to a patched version: 2.2.23 (for the 2.x branch), 3.1.21 (for the 3.0–3.1 branch), or 3.2.6 (for the 3.2 branch). The fix enforces a path segment boundary after the configured prefix, matching only paths exactly equal to the prefix or beginning with prefix + "/". As an interim workaround, avoid placing sensitive files under the Rack::Static root directory and use URL prefix mappings that cannot overlap with sensitive filenames. Audit server logs to identify any prior exploitation attempts (GitHub Advisory, Github Advisory).

Community reactions

The vulnerability was coordinated and published by Rack maintainer ioquatix, with th4s1s credited as the reporter and jeremyevans as the remediation reviewer (GitHub Advisory). IBM issued multiple security bulletins addressing this CVE across several products including IBM Aspera Faspex, IBM Aspera Enterprise WebApps, IBM Aspera Shares, IBM API Connect, IBM CloudPak for AIOps, and IBM License Metric Tool. Ubuntu issued security notice USN-8182-1, and SUSE published security updates (SUSE-SU-2026:1745-1 and SUSE-SU-2026:1964-1) addressing the vulnerability in their distributions.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

ruby-rack: 2.2.22-0+deb12u2

Fixed

sid

ruby-rack: 3.2.6-2

Fixed

trixie

ruby-rack: 3.1.20-0+deb13u2

Fixed

Ubuntu

Fixed

bionic (esm-apps)

ruby-rack: 1.6.4-4ubuntu0.2+esm10

Fixed

devel

ruby-rack

Affected

focal (esm-apps)

ruby-rack: 2.0.7-2ubuntu0.1+esm10

Fixed

jammy

ruby-rack

Affected

jammy (esm-apps)

ruby-rack: 2.1.4-5ubuntu1.2+esm3

Fixed

noble

ruby-rack: 2.2.7-1ubuntu0.7

Fixed

questing

ruby-rack: 3.1.16-0.1ubuntu0.3

Fixed

resolute

ruby-rack

Affected

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-110264CRITICAL10
  • Ruby logoRuby
  • rubygem-rdoc
NoYesOct 22, 2026
GHSA-h7x6-9mqf-vgmxHIGH8.2
  • Ruby logoRuby
  • avo
NoYesOct 22, 2026
GHSA-x65r-p6hf-94hvMEDIUM6.5
  • Ruby logoRuby
  • avo
NoYesOct 22, 2026
GHSA-58rx-96gf-w92xMEDIUM6.1
  • Ruby logoRuby
  • ransack
NoYesOct 25, 2026
CVE-2026-63183LOWN/A
  • Ruby logoRuby
  • omniauth
NoNoOct 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management