
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-52747 is a WAF inspection bypass vulnerability in ModSecurity (libmodsecurity) caused by the multipart/form-data request body parser silently stripping embedded line breaks (\r\n and \n) from non-file form-field values before exporting them to the ARGS and ARGS_POST rule variables. This creates a parser differential between ModSecurity and backend applications that preserve line breaks, allowing WAF rules to miss payloads whose dangerous syntax depends on a line break character. All versions of ModSecurity prior to 3.0.16 are affected. The vulnerability was disclosed on June 29, 2026, and carries a CVSS v3.1 base score of 8.6 (High) (GitHub Advisory, Red Hat).
The root cause lies in src/request_body_processor/multipart.cc within the Multipart::process_part_data() function (CWE-180: Incorrect Behavior Order: Validate Before Canonicalize; CWE-179: Incorrect Behavior Order: Early Validation). When processing non-file form-data parts, the parser attempts to prepend bytes held in m_reserve (which stores reserved CRLF/LF bytes from buffer boundaries), but immediately overwrites the destination string d with a second d.assign() call instead of using d.append(), discarding the reserved bytes. The fix is a one-character change: replacing d.assign(m_buf, ...) with d.append(m_buf, ...) in the m_reserve[0] != 0 branch (GitHub Commit). Critically, the built-in strict multipart validation variables (MULTIPART_STRICT_ERROR, MULTIPART_LF_LINE, MULTIPART_CRLF_LF_LINES) all remain 0 when this occurs, meaning the shipped strict multipart rule does not detect or flag the malformed input (GitHub Advisory). No authentication or special privileges are required; any HTTP client can send a crafted multipart/form-data POST request.
Successful exploitation allows an unauthenticated remote attacker to bypass ModSecurity WAF inspection rules and deliver malicious payloads directly to backend applications undetected. The confirmed security impact is a loss of integrity in request-body inspection: rule-visible values in ARGS/ARGS_POST can differ from what the backend application receives, enabling bypass of detection or blocking rules for inputs where a line break is semantically meaningful — such as multiline injection vectors, parser-sensitive payloads (e.g., HTTP header injection, CRLF injection, SQL injection with newlines), or signatures that rely on matching delimiters across line boundaries. The vulnerability does not directly cause memory corruption, data disclosure, or denial of service, but it undermines the security boundary that ModSecurity provides for all protected backend applications (GitHub Advisory).
A proof-of-concept (PoC) C++ harness is publicly available in the official GitHub Security Advisory, which compiles the real multipart.cc parser with minimal stubs and confirms the line-break stripping bug with output ARGS_POST_CRLF_LOSS_CONFIRMED (GitHub Advisory). The vulnerability is classified as automatable (no user interaction, no privileges required, network-accessible) per NVD SSVC assessment. The EPSS score is approximately 0.46%, and there is no current evidence of in-the-wild exploitation or CISA KEV catalog listing. The vulnerability is detectable via Nessus plugin 326376.
SecRequestBodyAccess On configured (the default recommended configuration), accepting multipart/form-data POST requests.multipart/form-data request where a non-file form field value contains an embedded line break (\r\n or \n) that is part of a malicious payload (e.g., a CRLF injection string, a SQL injection payload split across lines, or an XSS payload with a newline).POST /target-endpoint HTTP/1.1
Host: victim.example.com
Content-Type: multipart/form-data; boundary=abc
Content-Length: <length>
--abc\r\n
Content-Disposition: form-data; name="field"\r\n
\r\n
MALICIOUS_PART1\r\n
MALICIOUS_PART2\r\n
--abc--\r\n\r\n, presenting the concatenated value MALICIOUS_PART1MALICIOUS_PART2 to WAF rules. If the rule signature requires the line break to match (e.g., a regex or string match that includes \n), the rule will not fire.Content-Type: multipart/form-data containing form field values with embedded \r\n or \n sequences within the field body (not at boundary lines); requests where the same field value appears differently in WAF logs versus application logs.ARGS_POST values that appear truncated or missing line-break characters compared to the raw request body; absence of MULTIPART_STRICT_ERROR, MULTIPART_LF_LINE, or MULTIPART_CRLF_LF_LINES flags in logs despite multiline field content.Upgrade ModSecurity (libmodsecurity) to version 3.0.16 or later, which fixes the bug by changing d.assign() to d.append() in the MULTIPART_FORMDATA branch of process_part_data() (GitHub Release, GitHub Commit). No configuration-based workaround fully mitigates the issue, as the strict multipart validation rules (MULTIPART_STRICT_ERROR) do not detect the parser differential. As a defense-in-depth measure, implement additional input validation at the application layer and review WAF rules that rely on line-break-sensitive pattern matching for ARGS/ARGS_POST variables (GitHub Advisory).
The vulnerability received moderate coverage from security news outlets including GBHackers, CyberSecurityNews, and VPNcentral, framing it as a WAF rule evasion issue affecting web applications protected by ModSecurity (GBHackers). The Hacker Wire published a dedicated technical article on the parser differential (The Hacker Wire). The vulnerability was also discussed on Reddit's r/pwnhub and noted in The Hacker News weekly recap. Credits for discovery were given to Thai Son Dinh and Nguyen Huy Vu Dung from VinSOC Labs (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."