Vulnerability DatabaseCVE-2026-104269

CVE-2026-104269: 
ModSecurity vulnerability analysis and mitigation

Overview

CVE-2026-104269 is a security feature bypass vulnerability in OWASP ModSecurity's multipart parser, caused by its failure to implement RFC 2231 filename* parameter precedence. Affecting ModSecurity versions 3.0.0 through 3.0.16 (and the v2.x branch prior to 2.9.15), the flaw allows an attacker to supply a benign filename parameter that passes WAF inspection while embedding a malicious filename* value that RFC-compliant backend parsers (Go, Python, Node.js, Java) prefer and act upon. This discrepancy enables malicious file uploads to bypass MULTIPART_FILENAME inspection rules entirely. PHP's native multipart parser is not affected. The vulnerability carries a CVSS v3.1 base score of 8.6 (High) (GitHub Advisory, Red Hat CVE).

Technical details

The root cause is an interpretation conflict (CWE-436) and inconsistent HTTP request handling (CWE-444): ModSecurity's multipart parser reads only the plain filename parameter from Content-Disposition headers, ignoring the RFC 2231 filename* parameter (e.g., filename*=UTF-8''shell.php). RFC-compliant parsers in Go (mime.ParseMediaType), Python (Werkzeug, python-multipart), Node.js (busboy), and Java (Spring's ContentDisposition.parse()) all prefer filename* over filename when both are present, per RFC 6266. The fix in commit 463db0c (v3.x) and c6bd53d (v2.x) modifies parse_content_disposition() to parse and decode the filename* parameter and overwrite the filename value when filename* is present, ensuring ModSecurity evaluates the same filename the backend will use (GitHub Commit v3, GitHub Commit v2). No authentication or user interaction is required to exploit this vulnerability over the network.

Impact

Successful exploitation allows an unauthenticated remote attacker to upload files with arbitrary extensions (e.g., .php web shells) to backend applications protected by ModSecurity, bypassing WAF filename extension rules such as CRS rules 920120, 922100, and 922110. If the backend application stores the uploaded file using the attacker-controlled filename* value in a web-accessible directory, the attacker can achieve remote code execution (RCE) by subsequently requesting the uploaded file. The primary impact is high integrity loss (CVSS Integrity: High, Scope: Changed), with potential for full server compromise depending on application configuration (GitHub Advisory).

Exploitability

A proof-of-concept exploit demonstrating the WAF bypass via a crafted multipart HTTP request is publicly available in the GitHub Security Advisory (GitHub Advisory). The attack is network-accessible, requires no authentication or user interaction, and is classified as automatable by NVD SSVC analysis. As of the time of reporting, there is no confirmed evidence of in-the-wild exploitation, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is approximately 0.57%, indicating a relatively low but non-negligible probability of exploitation in the near term (Red Hat CVE).

Exploitation steps

  1. Reconnaissance: Identify web applications protected by ModSecurity (v3.0.0–3.0.16 or v2.x < 2.9.15) that accept file uploads and use RFC 2231-aware backend parsers (Go, Python/Flask/FastAPI, Node.js, Java/Spring). Look for upload endpoints via application fingerprinting or directory enumeration.

  2. Craft the malicious multipart request: Construct a multipart/form-data POST request where the Content-Disposition header contains both a benign filename (e.g., safe.jpg) and a malicious filename* parameter (e.g., filename*=UTF-8''shell.php). The body should contain a PHP web shell payload such as <?php system($_GET['c']); ?>:

POST /upload HTTP/1.1
Host: target.example.com
Content-Type: multipart/form-data; boundary=b
Content-Length: ...

--b
Content-Disposition: form-data; name="file"; filename="safe.jpg"; filename*=UTF-8''shell.php
Content-Type: image/jpeg

<?php system($_GET['c']); ?>
--b--
  1. WAF bypass: ModSecurity inspects only filename="safe.jpg", sees a .jpg extension, and allows the request through all filename extension rules (e.g., CRS rule 922110).

  2. Backend processes malicious filename: The RFC 2231-aware backend parser (e.g., Go's mime.ParseMediaType) decodes filename*=UTF-8''shell.php and returns shell.php as the effective filename, which the application uses for file storage.

  3. Achieve RCE: If the file is stored in a web-accessible directory, send a GET request to execute the web shell: GET /uploads/shell.php?c=id HTTP/1.1. The server executes the PHP file and returns command output (GitHub Advisory).

Indicators of compromise

  • Network: HTTP POST requests to file upload endpoints containing Content-Disposition headers with both filename= and filename*= parameters simultaneously; presence of filename*=UTF-8'' or similar RFC 2231 encoded values in multipart request headers.
  • Logs: Web server access logs showing POST requests to upload endpoints followed shortly by GET requests to the same directory for .php, .jsp, .aspx, or other executable file extensions; ModSecurity audit logs showing allowed requests with filename= containing image/document extensions where the body contains script content.
  • File System: Unexpected executable files (e.g., .php, .jsp, .aspx) appearing in upload directories; files with image-like names in the filesystem but containing server-side script content; newly created files with mismatched content type and extension.
  • Process: Unusual child processes spawned by the web server process (e.g., Apache, Nginx, IIS) executing system commands; unexpected outbound network connections from the web server process following a file upload event (GitHub Advisory).

Mitigation and workarounds

Upgrade ModSecurity to version 3.0.17 (v3.x branch) or 2.9.15 (v2.x branch), both of which implement RFC 2231 filename* parameter precedence in the multipart parser, ensuring the WAF evaluates the same filename the backend application will use (ModSecurity v3.0.17, ModSecurity v2.9.15). As a defense-in-depth measure independent of WAF version, implement filename validation and extension allowlisting at the application layer — do not rely solely on WAF rules for file upload security. Additionally, ensure uploaded files are stored outside the web root or in directories where server-side script execution is disabled (GitHub Advisory).

Community reactions

The vulnerability received coverage from multiple cybersecurity news outlets, including CyberSecurityNews, CyberPress, and DailySecurityReview, framing it as a high-severity WAF bypass with potential for RCE. HKCERT published a security bulletin on the issue. Social media discussion appeared on Mastodon (infosec.exchange and mastodon.social) shortly after public disclosure. The vulnerability was discovered and reported by researchers identified as 0xkalawy, ZeyadZonkorany, and B0YK4 (coordinator), as credited in the GitHub Security Advisory (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

modsecurity-apache

Affected

sid

modsecurity-apache

Affected

trixie

modsecurity-apache

Affected

Ubuntu

Unknown

bionic (esm-apps)

modsecurity-apache

Unknown

devel

modsecurity

Unknown

focal (esm-apps)

modsecurity

Unknown

jammy

modsecurity

Unknown

jammy (esm-apps)

modsecurity

Unknown

noble

modsecurity

Unknown

noble (esm-apps)

modsecurity

Unknown

resolute

modsecurity

Unknown

RHEL / CentOS

Affected

RHEL 8

mod_security.src

Affected

RHEL 9

mod_security.src

Affected

RHEL 10

mod_security.src

Affected

Source: This report was generated using AI

Related ModSecurity vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-73856HIGH8.6
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 05, 2026
CVE-2026-73857HIGH7.5
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 09, 2026
CVE-2026-61812MEDIUM6.3
  • ModSecurity logoModSecurity
  • cpe:2.3:a:owasp:modsecurity
NoYesNov 09, 2026
CVE-2026-104259MEDIUM5.4
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 09, 2026
CVE-2026-61813LOW3.7
  • ModSecurity logoModSecurity
  • modsecurity
NoYesNov 05, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management