Skip to main content
Vulnerability Database/CVE-2026-41508

CVE-2026-41508: OWASP Coraza WAF Multipart Bypass RCE

CVE-2026-41508 is a multipart parser bypass flaw in OWASP Coraza WAF that allows attackers to evade security rules through truncated requests. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-41508 Overview

CVE-2026-41508 affects OWASP Coraza, a Go-based web application firewall (WAF) library compatible with ModSecurity rulesets. The multipart body processor in internal/bodyprocessors/multipart.go treats io.ErrUnexpectedEOF as a non-fatal condition without setting the MULTIPART_STRICT_ERROR variable. Remote attackers can submit truncated multipart bodies to bypass the defensive rules 200002 and 200003 that depend on this signal. The flaw allows parser-disagreement payloads to pass the WAF and reach a backend that may interpret the truncated body differently.

Critical Impact

Attackers can bypass Coraza's recommended multipart defensive rules by sending truncated multipart bodies, enabling WAF evasion for payloads that trigger parser differentials downstream.

Affected Products

  • OWASP Coraza WAF versions 3.4.0 through 3.7.x
  • Applications embedding the corazawaf/coraza Go library in the affected range
  • Deployments relying on OWASP Core Rule Set multipart rules 200002 and 200003

Discovery Timeline

  • 2026-10-12 - CVE-2026-41508 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-41508

Vulnerability Analysis

The vulnerability is categorized as a Protection Mechanism Failure [CWE-693] in the multipart body processor. Coraza parses multipart/form-data requests to apply ModSecurity-compatible rules against uploaded fields and files. The parser invokes Go's standard mime/multipart reader, which returns io.ErrUnexpectedEOF when a request body terminates mid-part.

In affected versions, the processor treats this error as recoverable and halts parsing without setting MULTIPART_STRICT_ERROR. The OWASP Core Rule Set relies on that variable in rules 200002 and 200003 to flag malformed uploads. Because the signal never fires, the WAF accepts the truncated payload and forwards it to the backend. If the backend's multipart parser reconstructs the body differently than Coraza did, an attacker can smuggle fields or files that the WAF never inspected.

Root Cause

The root cause is an incomplete error-handling path in internal/bodyprocessors/multipart.go. The code captured io.ErrUnexpectedEOF, set a local seenUnexpectedEOF flag, and continued processing without propagating the condition to MultipartStrictError. The strict-error collection remained empty, so dependent rules never evaluated to true.

Attack Vector

A remote attacker crafts an HTTP request with Content-Type: multipart/form-data and deliberately truncates the body before the closing boundary. The malformed body triggers io.ErrUnexpectedEOF inside Coraza, which silently stops parsing. Downstream application servers that tolerate loose multipart framing may still process attacker-controlled parts that the WAF never saw.

go
// Patched behavior in internal/bodyprocessors/multipart.go
// Source: https://github.com/corazawaf/coraza/commit/f94c81bec209f658120c418448d0590a549b71df
						v.MultipartStrictError().(*collections.Single).Set("1")
						return err
					}
+					v.MultipartStrictError().(*collections.Single).Set("1")
					seenUnexpectedEOF = true
				}
				size = sz

The added line ensures MULTIPART_STRICT_ERROR is set to 1 whenever io.ErrUnexpectedEOF is observed, restoring the signal that rules 200002 and 200003 depend on.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-41508

Indicators of Compromise

  • HTTP requests with multipart/form-data content type and bodies truncated before the final boundary marker
  • Access logs showing successful multipart POSTs that lack matches on CRS rules 200002 or 200003
  • Backend application logs recording multipart fields or filenames absent from upstream WAF audit logs
  • Repeated requests from a single source with abnormally short Content-Length values relative to declared parts

Detection Strategies

  • Audit the Coraza version embedded in Go applications using go list -m github.com/corazawaf/coraza/v3 and flag versions >= 3.4.0, < 3.8.0
  • Enable Coraza audit logging and compare parsed field counts against backend request parsers for divergence
  • Instrument reverse proxies to log raw request sizes and reject requests where Content-Length does not match received bytes
  • Correlate 4xx/5xx responses from backends with multipart requests that the WAF cleared without strict-error findings

Monitoring Recommendations

  • Track per-endpoint rates of truncated multipart submissions and alert on anomalous spikes
  • Monitor Coraza transaction logs for the MULTIPART_STRICT_ERROR variable and alert when parsing anomalies occur without it being set
  • Forward WAF and application logs to a centralized analytics platform to detect parser-disagreement patterns across tiers

How to Mitigate CVE-2026-41508

Immediate Actions Required

  • Upgrade the github.com/corazawaf/coraza/v3 module to version 3.8.0 or later and rebuild dependent binaries
  • Inventory all internal services and proxies that embed Coraza, including custom WAF deployments and sidecars
  • Verify that the OWASP Core Rule Set is loaded with rules 200002 and 200003 enabled after the upgrade
  • Review recent multipart traffic for signs of truncation-based evasion attempts

Patch Information

The fix is included in Coraza v3.8.0. The patch commit f94c81b sets MultipartStrictError to 1 when io.ErrUnexpectedEOF is encountered. Full advisory details are available in GHSA-r3rm-qphw-hh76.

Workarounds

  • Add a reverse-proxy rule to reject multipart requests whose received body length does not match the declared Content-Length
  • Deploy a custom Coraza rule that inspects transaction state and blocks requests when multipart parsing terminates without reaching the final boundary
  • Enforce strict multipart validation at the backend application by rejecting requests that produce parser errors
bash
# Update Coraza to the patched release
go get github.com/corazawaf/coraza/v3@v3.8.0
go mod tidy
go build ./...

# Verify the installed version
go list -m github.com/corazawaf/coraza/v3

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.