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

CVE-2026-107834: OWASP Coraza WAF DOS Vulnerability

CVE-2026-107834 is a denial of service vulnerability in OWASP Coraza WAF that allows attackers to exhaust file descriptors through multipart uploads. This post explains its impact, affected versions, and mitigation steps.

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-107834 Overview

CVE-2026-107834 is a resource exhaustion vulnerability in OWASP Coraza, a Go-based ModSecurity-compatible Web Application Firewall (WAF) library. The flaw affects versions 3.0.0 through 3.7.x and is fixed in 3.8.0. The multipart body processor in internal/bodyprocessors/multipart.go defers temp.Close() for every uploaded file part, keeping each temporary file descriptor open until the entire request completes.

An unauthenticated remote attacker can submit a multipart request containing many small file parts, exhausting the process file-descriptor table within the request-body size limit. The condition is tracked as [CWE-400: Uncontrolled Resource Consumption].

Critical Impact

Exhaustion of the process file-descriptor table causes os.CreateTemp failures, MULTIPART_STRICT_ERROR responses, blocked legitimate uploads, and process-wide inability to open files or sockets.

Affected Products

  • OWASP Coraza WAF versions 3.0.0 through 3.7.x
  • Applications embedding Coraza as a WAF library in Go services
  • Reverse proxies and gateways using Coraza for request filtering

Discovery Timeline

  • 2026-10-09 - CVE-2026-107834 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-107834

Vulnerability Analysis

Coraza processes multipart request bodies by iterating over each part and writing uploaded content to a temporary file. For every part, the code creates a temp file with os.CreateTemp and schedules cleanup using defer temp.Close(). Because defer runs when the enclosing function returns, every file descriptor created during the loop stays open until the entire multipart parsing completes.

An attacker who submits a single multipart body containing thousands of minimal file parts can force Coraza to accumulate thousands of open file descriptors on one goroutine. Once the per-process RLIMIT_NOFILE limit is reached, subsequent calls to os.CreateTemp fail, Coraza raises MULTIPART_STRICT_ERROR, and the host process can no longer open sockets or files for any workload.

The EPSS score is 0.322% (percentile 23.683) as of 2026-10-16.

Root Cause

The root cause is the misuse of defer inside a loop. Deferred calls are stacked and executed on function exit, so file handles opened per iteration are never released incrementally. This is a classic Go anti-pattern that converts a bounded per-iteration resource into an unbounded per-request accumulator.

Attack Vector

Exploitation requires only network access to any endpoint protected by a vulnerable Coraza build that accepts multipart/form-data uploads. No authentication, user interaction, or elevated privileges are required. The attacker crafts a single HTTP request with a Content-Type: multipart/form-data body containing many small file parts, each under the configured request-body size limit.

go
// Patch excerpt from internal/bodyprocessors/multipart.go
// Source: https://github.com/corazawaf/coraza/commit/1bc39036e99c88e7de60cf8e6bb55ee4c311223c
                v.MultipartStrictError().(*collections.Single).Set("1")
                return err
            }
-           defer temp.Close()
            sz, err := io.Copy(temp, p)
+           if cerr := temp.Close(); cerr != nil && err == nil {
+               err = cerr
+           }
+           // Record the temp file before checking the copy/close error: it is
+           // already on disk at this point on every path, and only a name in
+           // FILES_TMPNAMES gets cleaned up when the transaction closes.
+           filesTmpNamesCol.Add("", temp.Name())
            if err != nil {
                if !errors.Is(err, io.ErrUnexpectedEOF) {
                    v.MultipartStrictError().(*collections.Single).Set("1")

The fix replaces the deferred close with an explicit close immediately after io.Copy, bounding the number of simultaneously open descriptors to one per iteration.

Detection Methods for CVE-2026-107834

Indicators of Compromise

  • HTTP requests with Content-Type: multipart/form-data containing an unusually high number of parts within a single body
  • Repeated Coraza log entries emitting MULTIPART_STRICT_ERROR from the same source address
  • Go runtime errors containing too many open files or os.CreateTemp failures on the WAF host

Detection Strategies

  • Instrument the WAF host to alert when the process file-descriptor count approaches RLIMIT_NOFILE
  • Parse Coraza audit logs for spikes in MULTIPART_STRICT_ERROR events and correlate with client IPs
  • Add a request-level counter on multipart part counts and alert on outliers compared to a traffic baseline

Monitoring Recommendations

  • Export /proc/<pid>/fd counts for the Coraza-embedded process to a metrics backend such as Prometheus
  • Track HTTP 5xx error rates on upload endpoints and alert on sustained increases
  • Monitor system log messages for EMFILE and ENFILE errors across the WAF fleet

How to Mitigate CVE-2026-107834

Immediate Actions Required

  • Upgrade OWASP Coraza to version 3.8.0 or later across all services that embed the library
  • Rebuild and redeploy any Go binaries that statically link Coraza; a library upgrade alone is not sufficient
  • Review inventory of reverse proxies, API gateways, and middleware that may vendor Coraza indirectly

Patch Information

The fix is included in Coraza 3.8.0. The patch, published in GitHub commit 1bc39036, removes the defer temp.Close() inside the multipart parsing loop and closes each temporary file immediately after io.Copy. See the GitHub Release v3.8.0 notes and the GitHub Security Advisory GHSA-rp9v-7xv3-r6g3 for complete details.

Workarounds

  • Reduce the maximum request-body size for multipart uploads at the proxy or WAF tier to limit the number of parts an attacker can submit
  • Raise the process RLIMIT_NOFILE ceiling to delay exhaustion while patching is in progress; this is mitigation only, not a fix
  • Restrict multipart upload endpoints to authenticated users or trusted networks where feasible
bash
# Example: temporarily raise file-descriptor limit for the WAF service (systemd)
# /etc/systemd/system/coraza-proxy.service.d/override.conf
[Service]
LimitNOFILE=65535

# Then reload and restart
sudo systemctl daemon-reload
sudo systemctl restart coraza-proxy.service

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.