GitHub Advisoryadvisory · Go
GHSA-r3rm-qphw-hh76 Coraza: Truncated multipart body bypasses MULTIPART_STRICT_ERROR (rule 200003) via silent io.ErrUnexpectedEOF handling
MEDIUM
Official page ↗
- Aliases
- CVE-2026-41508
- Ecosystem
- Go
- Packages
- github.com/corazawaf/coraza/v3
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
- Weaknesses
- CWE-20, CWE-693, CWE-755
- Reviewed
- 2026-10-06
Affected packages
• Go github.com/corazawaf/coraza/v3: >= 3.4.0, < 3.8.0 → fixed in 3.8.0
Description
Root Cause
File: `internal/bodyprocessors/multipart.go` (since commit `3347961b`, PR #1453 *"feat: ignore unexpected EOF in MIME multipart request body processor"*, merged 2026-03-06, first shipped in `v3.4.0`).
The multipart body processor treats `io.ErrUnexpectedEOF` as a benign condition. Three sites are affected; all mishandle the error the same way.
File branch, filesystem-backed (lines 71–77)
```go
sz, err := io.Copy(temp, p)
if err != nil {
if !errors.Is(err, io.ErrUnexpectedEOF) {
v.MultipartStrictError().(*collections.Single).Set("1")
return err
}
seenUnexpectedEOF = true // = 3.4.0, <= 3.7.0`.
Releases prior to `v3.4.0` returned `err` on `io.ErrUnexpectedEOF` and so `REQBODY_ERROR` would propagate via rule 200002 even if `MULTIPART_STRICT_ERROR` was not set — a different (arguably stricter) behavior that did not exhibit this bypass.
References
• `internal/bodyprocessors/multipart.go` lines 70–113
• `coraza.conf-recommended` rule `id:200003` (`MULTIPART_STRICT_ERROR`)
• PR #1453 — introduction of `ErrUnexpectedEOF` swallowing
• `coraza.conf-recommended` rule `id:200002` (`REQBODY_ERROR`) — also not raised because `ProcessRequest` returns `nil`
Related
Alias · CVE (1)
- CVE-2026-41508 OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. vulnerability