Security Resilience

CVE-2026-34785

Info Disclosure in Rack ≤ 2.2.23

Published
02 April 2026
Modified
24 July 2026
Patch / advisory
CVSS Score v3.1 7.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Score 0.0055 40th percentile
Risk Priority 58 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-34785 is a high-severity Partial String Comparison (CWE-187) vulnerability in Rack. Its CVSS base score is 7.5 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 40th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and AC-4 (Information Flow Enforcement) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-34785 is a vulnerability in Rack, a modular Ruby web server interface, specifically affecting the Rack::Static component in versions prior to 2.2.23, 3.1.21, and 3.2.6. Rack::Static uses a simple string prefix check to determine whether a request should be served as a static file. When configured with URL prefixes such as "/css", this check matches any request path beginning with that string, including unrelated paths like "/css-config.env" or "/css-backup.sql". As a result, files under the static root whose names share the configured prefix may be served unintentionally, leading to information disclosure.

Unauthenticated remote attackers can exploit this vulnerability by sending crafted HTTP requests to paths that match the configured prefix but target sensitive files in the static root directory. Successful exploitation requires network access and low complexity, with no privileges or user interaction needed. The CVSS v3.1 base score is 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N), indicating high confidentiality impact with no integrity or availability disruption. The issue maps to CWE-187 (Partial Evaluation of Regular Expression) and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor).

The vulnerability has been patched in Rack versions 2.2.23, 3.1.21, and 3.2.6. Security practitioners should upgrade to these fixed releases. Additional details are available in the GitHub security advisory at https://github.com/rack/rack/security/advisories/GHSA-h2jq-g4cq-5ppq.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

"/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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
T1530 Data from Cloud Storage Collection
Adversaries may access data from cloud storage.
T1553 Subvert Trust Controls Defense Impairment
Adversaries may undermine security controls that will either warn users of untrusted activity or prevent execution of untrusted programs.
T1589.001 Credentials Reconnaissance
Adversaries may gather credentials that can be used during targeting.
T1590.004 Network Topology Reconnaissance
Adversaries may gather information about the victim's network topology that can be used during targeting.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-22860Same product: Rack Rack
CVE-2025-61780Same product: Rack Rack
CVE-2026-25500Same product: Rack Rack
CVE-2025-25184Same product: Rack Rack
CVE-2025-27111Same product: Rack Rack
CVE-2026-34831Same product: Rack Rack
CVE-2026-26962Same product: Rack Rack
CVE-2025-27610Same product: Rack Rack
CVE-2026-34786Same product: Rack Rack
CVE-2026-34763Same product: Rack Rack

Affected Assets

rack
rack
≤ 2.2.23 · 3.0.0 — 3.1.21 · 3.2.0 — 3.2.6

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 5 hardening rules · 2 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V10.4.1
  • V8.4.2

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Access enforcement directly stops unauthorized actors from obtaining sensitive information.

Information flow enforcement structurally prevents sensitive data from reaching unauthorized recipients.

Protection of information at rest prevents unauthorized exposure of stored sensitive data.

Transmission confidentiality mechanisms stop exposure of sensitive data on the wire.

Least privilege reduces the set of actors who can reach sensitive information.

Developer testing and evaluation can discover incomplete string comparisons through targeted test cases.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.AA-05 mostly match
blocks

Enforcing least-privilege permissions and authorization policies directly prevents unauthorized file/directory exposure.

PR.IR-01 mostly match
blocks

Logical segmentation and access protections stop external parties from reaching files that should remain internal.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly prevent unsafe string comparisons by enforcing proper API usage and testing.

ID.RA-01 partial match
blocks

Vulnerability identification processes can discover partial-comparison flaws during code or binary analysis.

PR.DS-01 partial match
blocks

Data-at-rest protections such as encryption or ACLs reduce the impact of unintended file exposure.

PR.PS-01 partial match
blocks

Hardened configuration baselines commonly include file-system permission settings that limit external access.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

removes

CWE-552 is the absence of access control on files/directories (web roots without restrictions, cloud storage open to public, archives exposing sensitive files); A.8.3 mandates access restriction mechanisms (configuration controls, per-user/per-identity permissions, isolation of sensitive data), so applying it where it was not applied before configures those controls and the unauthorized accessibility stops being present — nothing of the weakness is left over.

finds

Security testing can detect and prevent partial string comparison flaws before deployment.

blocks

By requiring removal or masking of sensitive operational data before it enters test environments, the control sharply reduces the chance that such data will be exposed to unauthorized actors who have access to those environments.

removes

A.8.9's configuration monitoring and deviation correction removes the configuration-based instances of CWE-552 (cloud storage misconfigurations like 'Allow Blob Public Access' = true, IAM policies granting allUsers access, web server directory permissions), which constitute the bulk of modern instances; the remainder is the code/architecture-level instances (files placed under web root by design) that configuration management does not reach.

prevents

Graded partial by the owner: this user access lifecycle clause does not address cases where access groups and roles are not well defined, nor cases where user access provisioning is not normally applied, such as file permissions on a web server.

prevents

Training raises awareness of file placement under web roots, archive packaging hygiene, and cloud storage access configuration, and the clause specifically addresses technical teams' skills for configuring security — but CWE-552 arises from specific technical decisions (storage account flags, IAM bindings, archive exclusions) that training alone does not fully prevent, placing it closer to the CWE-598 anchor than the CWE-1428 one.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over our cross-walk; rows rated `none` are excluded, and each rule says how its mapping was checked.

Definition changed on 29 October 2026. Until then this section listed every rule rated above none, partial included. From that date it lists rules whose mapping is rated full or mostly and checked at llm_unverified or higher; partial mappings show when you ask.

No rule maps to these weaknesses at full or mostly. Tick the option above to see the partial mappings.

Oracle Linux 8 (2 partial rules)
  • V-248579 OL 8 must restrict access to the kernel message buffer. blocks CWE-552
  • V-248597 There must be no "shosts.equiv" files on the OL 8 operating system. blocks CWE-552

References