The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-2025-27111

CVE-2025-27111: Rack Log Injection Vulnerability

CVE-2025-27111 is a log injection vulnerability in Rack's Sendfile middleware that allows attackers to inject escape sequences through unsanitized X-Sendfile-Type headers. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: January 22, 2026

CVE-2025-27111 Overview

CVE-2025-27111 is a log injection vulnerability affecting Rack, the modular Ruby web server interface. The Rack::Sendfile middleware logs unsanitized header values from the X-Sendfile-Type header, allowing attackers to inject escape sequences (such as newline characters) into the header. This results in log injection, which can be exploited to manipulate log files, forge log entries, or potentially bypass security monitoring systems.

Critical Impact

Attackers can inject malicious escape sequences via the X-Sendfile-Type header, enabling log manipulation, log forging, and potential evasion of security monitoring in Ruby web applications using Rack middleware.

Affected Products

  • Rack versions prior to 2.2.12
  • Rack versions 3.0.x prior to 3.0.13
  • Rack versions 3.1.x prior to 3.1.11

Discovery Timeline

  • 2025-03-04 - CVE-2025-27111 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2025-27111

Vulnerability Analysis

This vulnerability exists in the Rack::Sendfile middleware component, which handles file serving optimization in Ruby web applications. When the middleware encounters an unknown X-Sendfile-Type header value, it logs an error message containing the unsanitized header value directly. The lack of proper input sanitization allows attackers to inject special characters, including newline sequences (\n, \r\n), into log files.

Log injection vulnerabilities (CWE-93) can have cascading security implications. Attackers may forge legitimate-looking log entries to cover their tracks, inject malicious data that could be interpreted by log analysis tools, or manipulate security information and event management (SIEM) systems that consume these logs.

Root Cause

The root cause is improper neutralization of CRLF sequences in HTTP headers (CWE-93). The vulnerable code directly interpolates the X-Sendfile-Type header value into a log message using string interpolation without sanitization. The original code used simple string interpolation ('#{type}') which preserved any control characters in the input, allowing them to be written directly to log output.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker can craft HTTP requests with malicious X-Sendfile-Type header values containing escape sequences. When processed by the vulnerable Rack middleware, these sequences are written to application logs, enabling:

  • Log forging to insert fake entries
  • Log poisoning to inject malicious content
  • Evasion of log-based security monitoring
  • Potential exploitation of log processing pipelines

The following patch demonstrates how the fix sanitizes the header value using Ruby's #inspect method:

ruby
           end
         when '', nil
         else
-          env[RACK_ERRORS].puts "Unknown x-sendfile variation: '#{type}'.\n"
+          env[RACK_ERRORS].puts "Unknown x-sendfile variation: #{type.inspect}"
         end
       end
       response

Source: GitHub Commit

The fix replaces direct string interpolation with #inspect, which escapes special characters and prevents control sequences from being interpreted literally in log output.

Detection Methods for CVE-2025-27111

Indicators of Compromise

  • Unusual multi-line entries in application logs originating from Rack middleware
  • Log entries containing unexpected escape sequences or control characters
  • Anomalous X-Sendfile-Type header values in web server access logs
  • Evidence of log file tampering or unexpected log entry formatting

Detection Strategies

  • Monitor web application logs for irregular formatting or injected content in Rack-related entries
  • Implement header validation rules to detect non-standard X-Sendfile-Type values
  • Deploy web application firewall (WAF) rules to inspect and block requests with control characters in headers
  • Review SIEM alerts for log injection patterns or anomalous log entry structures

Monitoring Recommendations

  • Enable verbose logging for Rack middleware to capture detailed request information
  • Configure log integrity monitoring to detect unauthorized modifications
  • Implement centralized log aggregation with anomaly detection capabilities
  • Set up alerts for requests containing escape sequences in HTTP headers

How to Mitigate CVE-2025-27111

Immediate Actions Required

  • Upgrade Rack to version 2.2.12, 3.0.13, or 3.1.11 or later immediately
  • Audit application logs for signs of exploitation or log injection attempts
  • Implement input validation on the X-Sendfile-Type header at the web server or WAF level
  • Review and harden log processing pipelines to handle potentially malicious input

Patch Information

Rack maintainers have released security patches across all affected version branches. The fix applies proper sanitization using Ruby's #inspect method to escape special characters before logging. Updates are available through standard Ruby gem distribution channels.

Official patch commits:

  • Patch for Rack 2.2.x
  • Patch for Rack 3.0.x
  • Patch for Rack 3.1.x

For additional details, refer to the GitHub Security Advisory GHSA-8cgq-6mh2-7j6v.

Workarounds

  • Deploy WAF rules to strip or reject requests with control characters in the X-Sendfile-Type header
  • Configure reverse proxy or load balancer to sanitize or block malicious header values
  • Disable the Rack::Sendfile middleware if not required for your application
  • Implement custom middleware to validate and sanitize headers before they reach Rack::Sendfile
bash
# Update Rack gem to patched version
gem update rack

# Or specify minimum version in Gemfile
# gem 'rack', '>= 2.2.12'  # for 2.x
# gem 'rack', '>= 3.0.13'  # for 3.0.x
# gem 'rack', '>= 3.1.11'  # for 3.1.x

bundle update rack

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechRack

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.43%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-93
  • Technical References
  • Debian LTS Announcement
  • Vendor Resources
  • GitHub Commit Change

  • GitHub Commit Change

  • GitHub Commit Change

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-32762: Rack Header Parsing Vulnerability

  • CVE-2026-26962: Rack Header Injection Vulnerability

  • CVE-2026-26961: Rack Multipart Smuggling Vulnerability

  • CVE-2025-25184: Rack Log Injection Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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