A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-34785

CVE-2026-34785: Rack Information Disclosure Vulnerability

CVE-2026-34785 is an information disclosure flaw in Rack web server interface caused by improper prefix matching in Rack::Static. This article covers the technical details, affected versions, impact, and mitigation.

Updated: May 15, 2026

CVE-2026-34785 Overview

CVE-2026-34785 is an information disclosure vulnerability in Rack, the modular Ruby web server interface used by most Ruby web frameworks including Ruby on Rails. The flaw resides in Rack::Static, which 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, the middleware matches any request path beginning with that string, including unrelated paths like /css-config.env or /css-backup.sql. Attackers can retrieve files under the static root whose names merely share the configured prefix. The issue is patched in versions 2.2.23, 3.1.21, and 3.2.6.

Critical Impact

Unauthenticated remote attackers can read sensitive files under the static root by crafting paths that share a configured static URL prefix, exposing configuration files, database backups, and other secrets.

Affected Products

  • Rack versions prior to 2.2.23
  • Rack versions 3.0.0 through 3.1.20
  • Rack versions 3.2.0 through 3.2.5

Discovery Timeline

  • 2026-04-02 - CVE-2026-34785 published to NVD
  • 2026-04-16 - Last updated in NVD database

Technical Details for CVE-2026-34785

Vulnerability Analysis

The vulnerability is classified as [CWE-187: Partial String Comparison] and results in information disclosure over the network without authentication or user interaction. Rack::Static is middleware that serves static files from a configured root directory when request paths match one of the operator-supplied URL prefixes. Instead of treating prefixes as path segments, Rack performs a raw String#start_with? comparison. This allows file names that share a textual prefix with a directory name to fall into the static-serving branch and be returned to the caller. The result is that files unrelated to the intended static asset directory become reachable if their names happen to begin with the configured prefix string.

Root Cause

The root cause is a partial string comparison rather than a path-segment-aware match in the Rack::Static middleware. A prefix like /css is intended to scope only the /css/ directory, but the comparison treats /css-backup.sql as a valid match. Any file in the static root whose filename starts with the prefix text is served, regardless of whether it is an intended static asset.

Attack Vector

An unauthenticated remote attacker sends HTTP requests for crafted paths that begin with a configured static prefix but reference unrelated files in the same root directory. For an application configured to serve /css, requests targeting paths such as /css-config.env, /css-backup.sql, or /css.bak may return the file contents directly. The attack requires no privileges or user interaction and depends only on the attacker guessing or enumerating filenames adjacent to the static directory. Sensitive artifacts such as environment files, database dumps, and backup archives are common disclosure targets.

No public proof-of-concept exploit code has been published. See the GitHub Security Advisory GHSA-h2jq-g4cq-5ppq for the maintainer's technical description.

Detection Methods for CVE-2026-34785

Indicators of Compromise

  • HTTP 200 responses for request paths that share a static prefix but reference non-asset file extensions such as .env, .sql, .bak, .yml, or .pem.
  • Web server access logs showing requests to paths like /css-config.env, /js-backup.sql, or similar prefix-adjacent filenames.
  • Outbound transfer of unusually large response bodies from URLs immediately adjacent to known static asset directories.

Detection Strategies

  • Inventory all Rack-based applications and identify any use of Rack::Static along with its configured :urls prefixes.
  • Review access logs for request paths that begin with a configured static prefix but include unexpected characters such as -, ., or _ immediately after the prefix.
  • Audit the static root directory for files whose names share a prefix with configured URL paths and could be inadvertently served.

Monitoring Recommendations

  • Forward web server and application logs to a centralized analytics platform and alert on 200 responses for sensitive file extensions.
  • Add web application firewall (WAF) rules to flag or block requests matching patterns like /<prefix>[-_.][^/]*\.(env|sql|bak|key|pem|yml).
  • Track Rack and Ruby dependency versions across the fleet using software composition analysis to identify vulnerable releases.

How to Mitigate CVE-2026-34785

Immediate Actions Required

  • Upgrade Rack to 2.2.23, 3.1.21, or 3.2.6 depending on the major version in use.
  • Move sensitive files such as .env, database dumps, and backups out of any directory configured as a Rack::Static root.
  • Audit Rack::Static configurations and rename or remove files whose names share a prefix with configured URL paths.

Patch Information

The Rack maintainers released fixed versions 2.2.23, 3.1.21, and 3.2.6 that correct the prefix comparison logic in Rack::Static. Application owners should update the rack gem in Gemfile.lock and redeploy. Refer to the Rack Security Advisory GHSA-h2jq-g4cq-5ppq for upgrade guidance and complete release notes.

Workarounds

  • Restructure the static asset directory so it contains only intended public assets and no adjacent sensitive files.
  • Configure Rack::Static with explicit, narrowly scoped prefixes that end in a trailing slash where supported, and avoid serving the application root.
  • Place a reverse proxy or WAF in front of the application to block requests for sensitive file extensions regardless of path prefix.
bash
# Update Rack to a patched version
bundle update rack

# Verify installed version meets the fix
bundle list | grep rack
# Expected: rack (2.2.23) or (3.1.21) or (3.2.6) or later

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechRack

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-187
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-34763: Rack Information Disclosure Vulnerability

  • CVE-2026-26961: Rack Ruby Web Server CSRF Vulnerability

  • CVE-2026-34786: Rack Header Bypass Vulnerability

  • CVE-2026-39324: Rack::Session Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English