Vulnerability in rack (CVE-2026-34785)
Summary
Vulnerability in rack (CVE-2026-34785). Confidential information can be exposed externally. Mitigation: upgrade to 3.2.6 or later.
Original description
The description as published by the source.
Summary
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.
Details
Rack::Static#route_file performs static-route matching using logic equivalent to:
@urls.any? { |url| path.index(url) == 0 }
This checks only whether the request path starts with the configured prefix string. It does not require a path segment boundary after the prefix.
For example, with:
use Rack::Static, urls: ["/css", "/js"], root: "public"
the following path is matched as intended:
/css/style.css
but these paths are also matched:
/css-config.env
/css-backup.sql
/csssecrets.yml
If such files exist under the configured static root, Rack forwards the request to the file server and serves them as static content.
This means a configuration intended to expose only directory trees such as /css/... and /js/... may also expose sibling files whose names begin with those same strings.
Impact
An attacker can request files under the configured static root whose names share a configured URL prefix and obtain their contents.
In affected deploymen…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-34785 has been found in rack.
Confidential information can be exposed externally. CVSS score: 7.5/10.
What to do: upgrade rack to 3.2.6 or later.
If unsure, ask your IT team or search "rack CVE-2026-34785" on the vendor's site.
CVE-2026-34785 (rack) — CWE-187 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Patched: 3.2.6 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-187) exists in rack.
Check the vendor advisory for the affected versions of rack.
Severity: High (CVSS 7.5/10). Confidential information can be exposed externally.
Update to 3.2.6.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'rack' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'rack' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
rackを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade rack to 3.2.6ステージング環境で 3.2.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-34785 ruby-rack
- Ubuntu UBUNTU-CVE-2026-34785 ruby-rack Fixed in: 1.5.2-3+deb8u3ubuntu1~esm11
References
- advisory nvd.nist.gov
- package github.com
- patch security-advisories@github.com
- web github.com
- web github.com
- web access.redhat.com
- web bugzilla.redhat.com
- web security.access.redhat.com