<Vulnerability name="CVE-2026-52747">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-07-10T21:42:11</PublicDate>
    <Bugzilla id="2499232" url="https://bugzilla.redhat.com/show_bug.cgi?id=2499232" xml:lang="en:us">
ModSecurity: ModSecurity: Security rule bypass due to incorrect handling of line breaks in form data
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>5.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-179</CWE>
    <Details xml:lang="en:us" source="Mitre">
ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. Prior to 3.0.16, the multipart/form-data request body parser in libmodsecurity silently removes embedded line breaks from non-file form-field values before exporting them to ARGS and ARGS_POST because src/request_body_processor/multipart.cc overwrites reserved bytes in m_reserve instead of appending the current buffer. This creates a parser differential between ModSecurity and backend applications that preserve line breaks in form fields, allowing rules that inspect ARGS or ARGS_POST to miss payloads whose dangerous syntax depends on a line break. This issue is fixed in version 3.0.16.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in ModSecurity, an open-source web application firewall (WAF). The multipart/form-data request body parser in libmodsecurity incorrectly handles embedded line breaks in non-file form-field values. This discrepancy between ModSecurity and backend applications, which preserve line breaks, can allow an attacker to bypass security rules. This bypass could lead to the execution of dangerous payloads that rely on line breaks, potentially resulting in a security compromise.
    </Details>
    <Statement xml:lang="en:us">
This issue is classified as Moderate severity primarily because:
Conditions for Exploitation: Successful exploitation requires a specific scenario where the backend application preserves line breaks and is inherently vulnerable to a payload that utilizes those line breaks. 

Additionally, the ModSecurity configuration must rely on rules inspecting the affected ARGS or ARGS_POST variables to allow the bypass to occur.

Impact Limitations: The vulnerability functions solely as a security control bypass, allowing potentially malicious requests to evade the Web Application Firewall (WAF). It does not directly cause privilege escalation, data corruption, or arbitrary code execution on the host system. The actual impact depends entirely on whether the backend application being protected is vulnerable to the bypassed requests.
    </Statement>
    <Mitigation xml:lang="en:us">
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
    </Mitigation>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Out of support scope</FixState>
        <PackageName>mod_security</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:8">
        <ProductName>Red Hat Enterprise Linux 8</ProductName>
        <FixState>Fix deferred</FixState>
        <PackageName>mod_security</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Fix deferred</FixState>
        <PackageName>mod_security</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-52747
https://nvd.nist.gov/vuln/detail/CVE-2026-52747
https://github.com/owasp-modsecurity/ModSecurity/commit/875504c2758169c41be1ad2f0cc64d896b7815d7
https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v3.0.16
https://github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-rcw9-2f5r-7p88
    </References>
</Vulnerability>