Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2024-38474

CVE-2024-38474: Apache HTTP Server RCE Vulnerability

CVE-2024-38474 is a remote code execution flaw in Apache HTTP Server's mod_rewrite that enables attackers to execute scripts in restricted directories. This article covers technical details, affected versions, and mitigation.

Published: January 28, 2026

CVE-2024-38474 Overview

CVE-2024-38474 is a substitution encoding vulnerability in the mod_rewrite module of Apache HTTP Server versions 2.4.59 and earlier. This flaw allows remote attackers to execute scripts in directories that are permitted by the server configuration but not directly reachable by any URL. Additionally, attackers can exploit this vulnerability to achieve source disclosure of scripts that were intended to only be executed as CGI programs.

The vulnerability stems from improper encoding of substitutions in RewriteRules, which can be abused to bypass security restrictions and access protected resources. Organizations running affected versions of Apache HTTP Server should prioritize upgrading to version 2.4.60 or later, which addresses this issue.

Critical Impact

This vulnerability enables unauthorized script execution and source code disclosure on Apache HTTP Server installations, potentially leading to complete system compromise through network-based attacks requiring no authentication or user interaction.

Affected Products

  • Apache HTTP Server versions up to and including 2.4.59
  • NetApp Clustered Data ONTAP 9.0
  • Any system utilizing vulnerable mod_rewrite configurations with unsafe capture and substitution patterns

Discovery Timeline

  • 2024-07-01 - CVE-2024-38474 published to NVD
  • 2025-03-25 - Last updated in NVD database

Technical Details for CVE-2024-38474

Vulnerability Analysis

This vulnerability is classified under CWE-116 (Improper Encoding or Escaping of Output). The core issue lies in how Apache HTTP Server's mod_rewrite module handles substitution encoding when processing RewriteRules that capture and substitute URL components.

When RewriteRules are configured to capture portions of a request URL and use those captured values in substitutions, the module fails to properly encode certain characters. This encoding flaw allows attackers to craft malicious requests that bypass intended access restrictions.

The practical impact is twofold: attackers can execute scripts located in directories that administrators intended to protect from direct URL access, and they can obtain the source code of CGI scripts that should only be executed rather than displayed. This source disclosure can reveal sensitive information such as database credentials, API keys, and application logic that could be leveraged for further attacks.

Root Cause

The root cause is improper output encoding in the mod_rewrite substitution handling logic. When RewriteRules capture user-controlled input and substitute it into new paths or URLs, the module does not adequately sanitize or encode special characters. This allows crafted input to manipulate the resulting path in ways that bypass directory restrictions and access control mechanisms.

Apache has addressed this by making RewriteRules that capture and substitute unsafely fail by default unless the new UnsafeAllow3F rewrite flag is explicitly specified, providing administrators explicit control over potentially dangerous configurations.

Attack Vector

The attack is network-based and can be executed remotely without authentication. An attacker sends specially crafted HTTP requests to a vulnerable Apache HTTP Server with misconfigured RewriteRules. By manipulating URL components that are captured by RewriteRules, the attacker can inject encoded characters that, after improper substitution handling, result in access to restricted directories or script source files.

The attack requires no user interaction and can be automated, making it particularly dangerous for internet-facing web servers. Exploitation targets servers with RewriteRules that use backreferences from pattern matches in substitution strings without proper validation.

Detection Methods for CVE-2024-38474

Indicators of Compromise

  • Unusual HTTP requests containing encoded characters targeting rewritten URLs
  • Access log entries showing requests to paths that should not be directly reachable
  • Unexpected file access patterns in directories containing CGI scripts
  • Web server error logs showing rewrite processing anomalies

Detection Strategies

  • Review Apache access logs for requests with suspicious URL encoding patterns, particularly those containing %3F sequences
  • Monitor for unusual access patterns to CGI script directories that bypass normal URL routing
  • Implement web application firewall rules to detect and block requests with malformed URL encodings targeting rewrite endpoints
  • Audit RewriteRule configurations for patterns that capture and substitute user input without proper sanitization

Monitoring Recommendations

  • Enable detailed Apache logging including mod_rewrite trace logging during investigation periods
  • Configure SIEM alerts for anomalous access patterns to protected directories
  • Monitor file access times on CGI scripts to detect unauthorized read operations
  • Implement network-level monitoring for HTTP traffic patterns consistent with exploitation attempts

How to Mitigate CVE-2024-38474

Immediate Actions Required

  • Upgrade Apache HTTP Server to version 2.4.60 or later immediately
  • Audit all RewriteRule configurations for patterns that capture and substitute user-controlled input
  • Review server configurations to ensure CGI scripts are properly protected from source disclosure
  • Implement temporary access restrictions on sensitive directories until patching is complete

Patch Information

Apache has released version 2.4.60 which fixes this vulnerability. The update modifies the behavior of RewriteRules that capture and substitute potentially unsafe content, causing them to fail by default. Administrators who have reviewed their configurations and determined that unsafe substitutions are acceptable can use the new UnsafeAllow3F rewrite flag to maintain previous behavior.

For detailed information, refer to the Apache HTTP Server Security Vulnerabilities page. NetApp customers should consult the NetApp Security Advisory NTAP-20240712-0001 for guidance on affected ONTAP versions.

Workarounds

  • Review and restrict RewriteRules that use backreferences in substitutions, particularly those handling user-controlled input
  • Implement additional access controls at the directory level to prevent unauthorized script access
  • Use a web application firewall to filter requests containing suspicious encoded characters
  • Consider disabling mod_rewrite entirely if not required for application functionality
bash
# Configuration example: Audit RewriteRules in Apache configuration
# Check for potentially vulnerable patterns in httpd.conf or .htaccess files

# Enable rewrite logging for investigation (Apache 2.4+)
LogLevel alert rewrite:trace3

# Example of restricting a directory that should not be directly accessible
<Directory "/var/www/protected-scripts">
    Require all denied
</Directory>

# After upgrading to 2.4.60, vulnerable rules will fail unless explicitly allowed
# Only add UnsafeAllow3F after thorough security review:
# RewriteRule ^(.*)$ /path/$1 [UnsafeAllow3F]

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechApache

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.61%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-116
  • Technical References
  • NetApp Security Advisory NTAP-20240712-0001

  • OpenWall OSS Security Discussion
  • Vendor Resources
  • Apache HTTP Server Vulnerabilities
  • Related CVEs
  • CVE-2016-15057: Apache Continuum RCE Vulnerability

  • CVE-2025-67895: Apache Airflow Edge3 Provider RCE Flaw

  • CVE-2025-58098: Apache HTTP Server SSI RCE Vulnerability

  • CVE-2025-53192: Apache Commons OGNL RCE Vulnerability
Default Legacy - Prefooter | 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