Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-24072-Analysis — Technical analysis of CVE-2026-24072, a local privilege escalation in Apache HTTP Server mod_rewrite, including root cause, patches, and Dockerized testing lab for verification. | Kitploit
Tools/GitHubGitHub/meh098/cve-2026-24072-analysis
Vulnerability AnalysisExploitationWeb SecurityPapers & ResearchLearning & EducationCurated Resources
GitHubmeh098/cve-2026-24072-analysis

CVE-2026-24072-Analysis

Technical analysis of CVE-2026-24072, a local privilege escalation in Apache HTTP Server mod_rewrite, including root cause, patches, and Dockerized testing lab for verification.

View Repository
484 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-24072: Apache HTTP Server mod_rewrite Privilege Escalation Analysis

CVE-2026-24072 is a moderate-severity local privilege escalation vulnerability in Apache HTTP Server 2.4.66 and earlier. It allows local .htaccess authors to read arbitrary files on the filesystem with the privileges of the httpd user by leveraging ap_expr expression evaluation inside mod_rewrite, mod_setenvif, and mod_proxy_fcgi.

Overview

FieldValue
CVE IDCVE-2026-24072
SeverityModerate (Local Privilege Escalation / Information Disclosure)
AffectedApache HTTP Server <= 2.4.66
FixedApache HTTP Server 2.4.67
Attack VectorLocal (requires .htaccess write access)

Quick Start

  • Read the full analysis: CVE-2026-24072-analysis.md
  • View the patches: mod_rewrite.diff, mod_setenvif.diff, mod_proxy_fcgi.diff
  • See proof-of-concept examples: examples/

Root Cause

Apache's expression evaluation engine (ap_expr) provides filesystem introspection functions:

  • file(path) — reads file contents
  • filesize(path) — returns file size
  • -d path, -e path, -f path, -s path, -L path, -h path, -x path — filesystem tests

In 2.4.66 and earlier, modules such as mod_rewrite (via RewriteCond expr=...), mod_setenvif (via SetEnvIfExpr), and mod_proxy_fcgi (via ProxyFCGIBackendType condition expressions) would parse and evaluate ap_expr expressions without passing the AP_EXPR_FLAG_RESTRICTED flag when operating in .htaccess context. This meant that any local user who could write a .htaccess file could use these expression functions to probe or read the filesystem with the full privileges of the httpd process.

The Fix

The fix is conceptually simple: when parsing ap_expr expressions in .htaccess context, pass the AP_EXPR_FLAG_RESTRICTED flag.

All three patched modules use the same idiom to detect .htaccess parsing context:

root@kitploit:~
int in_htaccess = cmd->pool == cmd->temp_pool;

When Apache parses .htaccess files, the per-directory configuration pool (cmd->pool) is the same as the temporary pool (cmd->temp_pool). This is a well-known internal Apache convention for detecting .htaccess (per-directory) context vs. main server/virtual host context.

Files in this Repository

FileDescription
CVE-2026-24072-analysis.mdFull technical analysis and impact assessment
mod_rewrite.diffPatch for modules/mappers/mod_rewrite.c
mod_setenvif.diffPatch for modules/metadata/mod_setenvif.c
mod_proxy_fcgi.diffPatch for modules/proxy/mod_proxy_fcgi.c
httpd-2.4.66/Source tree of vulnerable Apache version
httpd-2.4.67/Source tree of fixed Apache version
examples/Proof-of-concept .htaccess files

Verifying the Patch

This repository includes a Dockerized testing lab that lets you swap between the vulnerable and patched mod_rewrite modules to verify the fix works:

root@kitploit:~
# Build and start the lab
make build
make up

# Run the full automated test matrix (both variants)
make test

The lab uses a sentinel file (/opt/sentinel/secret.txt) that is readable only by the daemon user (the user httpd runs as). On the vulnerable build, .htaccess expressions can read and match the sentinel's contents. On the fixed build, parsing fails with not available in restricted context.

See docs/TESTING.md for the full guide.

Files in this Repository

FileDescription
CVE-2026-24072-analysis.mdFull technical analysis and impact assessment
mod_rewrite.diffPatch for modules/mappers/mod_rewrite.c
mod_setenvif.diffPatch for modules/metadata/mod_setenvif.c
mod_proxy_fcgi.diffPatch for modules/proxy/mod_proxy_fcgi.c
httpd-2.4.66/Source tree of vulnerable Apache version
httpd-2.4.67/Source tree of fixed Apache version
examples/Proof-of-concept .htaccess files
docker/Docker build files for the testing lab
scripts/Swap and test scripts
tests/Test fixtures and matrix
docs/TESTING.mdFull testing guide
docs/session/Session export from the design process

References

  • CVE-2026-24072 - Apache HTTP Server: mod_rewrite elevation of privileges via ap_expr
  • Apache HTTP Server 2.4 Security Vulnerabilities
  • cPanel Security Advisory for CVE-2026-24072

Disclaimer

This repository is for educational and defensive purposes only. The proof-of-concept examples are intended to help security professionals understand and defend against this vulnerability. Do not use these techniques on systems you do not own or have explicit permission to test.

Download Tool