Vulnerabilities in pkg:golang/github.com/corazawaf/coraza/v3
PACKAGECVE-2026-107834 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Coraza libraries in the Go ecosystem. The issue involves resource exhaustion via deferred file handle accumulation in multipart body processor. Remediation is available by upgrading affected packages to version 3.8.0.
pkg:golang/github.com/corazawaf/coraza/v3
Vulnerability advisories affecting package pkg:golang/github.com/corazawaf/coraza/v3. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-rp9v-7xv3-r6g3 | CVE-2026-107834 | MODERATE | Coraza: Resource exhaustion via deferred file handle accumulation in multipart body processor |
| GHSA-3c6w-j9xm-8h2h | CVE-2026-107833 | MODERATE | Coraza: Unbounded recursion in JSON response body processor causes CPU exhaustion |
| GHSA-6gcq-wc29-5xf2 | CVE-2026-107826 | HIGH | Coraza JSON body processor: argument-limit truncation reopens an unbounded-depth gjson.Valid stack overflow (process crash) |
| GHSA-x26q-wvhg-fh4m | CVE-2026-107825 | MODERATE | Coraza: ProcessURI silently drops QUERY_STRING and ARGS_GET on URI parse failure — defense-in-depth bypass for non-net/http integrations |
| GHSA-w253-m66g-rx24 | - | MODERATE | Coraza: URL-encoded form Content-Type parameters bypass Coraza body inspection |
| GHSA-3wr7-993q-jrff | - | MODERATE | Coraza: Multipart filename* (RFC 5987) charset restriction lets a decoy filename bypass FILES-based rules |
| GHSA-g4qm-m288-5cp9 | - | MODERATE | Coraza has Cookie Parser Confusion |
| GHSA-pc5q-qfxp-ggqv | CVE-2026-104774 | MODERATE | Coraza: jsDecode Off-by-One in Octal Escape Handling Enables WAF Bypass |
| GHSA-5gj4-9gm7-2fx2 | - | MODERATE | Coraza body processor has a JSON key collision that allows unauthenticated attackers to bypass OWASP CRS inspection |
| GHSA-6r3q-mjv7-xr8m | CVE-2026-41510 | HIGH | Coraza: Silent argument drop at ArgumentLimit allows bypass of ARGS-targeted rules via parameter flooding |
| GHSA-r3rm-qphw-hh76 | CVE-2026-41508 | MODERATE | Coraza: Truncated multipart body bypasses MULTIPART_STRICT_ERROR (rule 200003) via silent io.ErrUnexpectedEOF handling |
| GHSA-prpw-wwv7-xjjr | CVE-2026-41504 | MODERATE | Coraza: Native audit-log format allows CRLF injection and log forgery via request body and header fields |
| GHSA-q9f5-625g-xm39 | CVE-2025-29914 | MODERATE | OWASP Coraza WAF has parser confusion which leads to wrong URI in `REQUEST_FILENAME` |
| GHSA-c2pj-v37r-2p6h | CVE-2023-40586 | HIGH | Coraza has potential denial of service vulnerability |
CVE-2026-107834 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-107834
To remediate this vulnerability, upgrade all affected Coraza dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/corazawaf/coraza/v3 to 3.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/corazawaf/coraza/v3
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-107834, inspect your project dependencies for Coraza:
inspect dependencies for github.com/corazawaf/coraza/v3
Analyze the terminal output to locate any version of Coraza in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.8.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Coraza, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-107834 Affected Coraza Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/corazawaf/coraza/v3
|
Go |
≥ 3.0.0
< 3.8.0
|
3.8.0
|
References
Frequently Asked Questions
What is CVE-2026-107834?
Which Coraza versions are affected?
What version fixes CVE-2026-107834?
Is github.com/corazawaf/coraza/v3 affected?
What is the CVSS score of CVE-2026-107834?
What CWE is associated with CVE-2026-107834?
How can I check Go dependencies for CVE-2026-107834?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rp9v-7xv3-r6g3",
"modified" : "2026-10-09T17:41:10Z",
"published" : "2026-10-08T17:52:00Z",
"aliases" : [ "CVE-2026-107834" ],
"summary" : "Coraza: Resource exhaustion via deferred file handle accumulation in multipart body processor",
"details" : "## Summary\n\n`defer temp.Close()` sits inside a `for` loop in the multipart processor. Go defers run at function return, not loop end, so every file part in the request holds an open fd until `ProcessRequest()` exits. Send enough parts and you hit `EMFILE`. With CRS loaded, that flips `MULTIPART_STRICT_ERROR` to 1 and rule `200001` starts returning 400s, including on legitimate requests hitting the same condition.\n\n## Details\n\n`internal/bodyprocessors/multipart.go`, line 69:\n\n```go\nfor {\n p, err := mr.NextPart()\n // ...\n temp, err := os.CreateTemp(storagePath, \"crzmp*\")\n defer temp.Close() // wrong scope\n io.Copy(temp, p)\n}\n```\n\nEach iteration opens a temp file and defers its close. All of them stack up and fire together when `ProcessRequest` returns. 500 parts, 500 fds held simultaneously.\n\nThe body size limit (default 128MB) caps total bytes, not part count. A minimal file part (boundary line, `Content-Disposition` with `filename=`, one byte of content) is about 104 bytes. That's roughly 65,000 parts per 6.8MB of body, which on a standard Linux system (hard fd limit 65536) is enough to exhaust the table.\n\nFix is straightforward: call `temp.Close()` explicitly after `io.Copy` instead of deferring it.\n\n## PoC\n\nTested on v3.7.0 (`db9850b`), Go 1.25, Linux x86_64.\n\nAdd this file at `internal/bodyprocessors/poc_fd_test.go` and run:\n\n```text\ngo test -v -run TestMultipartFDLeak ./internal/bodyprocessors/...\n```\n\n```go\npackage bodyprocessors_test\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"testing\"\n\n\t\"github.com/corazawaf/coraza/v3/experimental/plugins/plugintypes\"\n\t\"github.com/corazawaf/coraza/v3/internal/bodyprocessors\"\n\t\"github.com/corazawaf/coraza/v3/internal/corazawaf\"\n)\n\nfunc countFDs() int {\n\te, _ := os.ReadDir(\"/proc/self/fd\")\n\treturn len(e)\n}\n\nfunc TestMultipartFDLeak(t *testing.T) {\n\tboundary := \"testboundary\"\n\tvar sb strings.Builder\n\tfor i := 0; i < 500; i++ {\n\t\tfmt.Fprintf(&sb, \"--%s\\r\\n\", boundary)\n\t\tfmt.Fprintf(&sb, \"Content-Disposition: form-data; name=\\\"f%d\\\"; filename=\\\"f%d.txt\\\"\\r\\n\", i, i)\n\t\tsb.WriteString(\"\\r\\n\")\n\t\tsb.WriteString(\"X\\r\\n\")\n\t}\n\tfmt.Fprintf(&sb, \"--%s--\\r\\n\", boundary)\n\n\tmp, _ := bodyprocessors.GetBodyProcessor(\"multipart\")\n\tbaseline := countFDs()\n\n\tvar peak int64\n\tdone := make(chan struct{})\n\tvar wg sync.WaitGroup\n\twg.Add(1)\n\tgo func() {\n\t\tdefer wg.Done()\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase <-done:\n\t\t\t\treturn\n\t\t\tdefault:\n\t\t\t\tn := int64(countFDs())\n\t\t\t\tfor {\n\t\t\t\t\tcur := atomic.LoadInt64(&peak)\n\t\t\t\t\tif n <= cur || atomic.CompareAndSwapInt64(&peak, cur, n) {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}()\n\n\tv := corazawaf.NewTransactionVariables()\n\tmp.ProcessRequest(strings.NewReader(sb.String()), v,\n\t\tplugintypes.BodyProcessorOptions{\n\t\t\tMime: \"multipart/form-data; boundary=\" + boundary,\n\t\t\tStoragePath: t.TempDir(),\n\t\t})\n\tclose(done)\n\twg.Wait()\n\n\tt.Logf(\"baseline=%d peak=%d spike=+%d\",\n\t\tbaseline, atomic.LoadInt64(&peak),\n\t\tatomic.LoadInt64(&peak)-int64(baseline))\n}\n```\n\nOutput:\n\n```text\nbaseline=7 peak=506 spike=+499\n```\n\nThe spike is ~1 fd per part. After `ProcessRequest` returns the deferred closes fire and it drops back to baseline.\n\n## Impact\n\n- **No authentication required.** Any endpoint that accepts multipart uploads is affected.\n- **fd exhaustion at ~6.8MB body (~65k parts).** `os.CreateTemp` starts returning errors and `MULTIPART_STRICT_ERROR` is set to 1.\n- **CRS false positives / DoS.** With CRS loaded, rule `200001` then blocks the request with a 400 — and any other multipart request processed concurrently that runs into the same condition gets blocked too. At that point the WAF can't distinguish the attack from a legitimate upload.\n- **Process-wide impact.** While the fd table is full the process can't open sockets or files for anything else either.\n- **Scope.** Affects all v3.x releases; the `defer` has been present since the multipart processor was introduced.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/corazawaf/coraza/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/corazawaf/coraza/security/advisories/GHSA-rp9v-7xv3-r6g3"
}, {
"type" : "WEB",
"url" : "https://github.com/corazawaf/coraza/commit/1bc39036e99c88e7de60cf8e6bb55ee4c311223c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/corazawaf/coraza"
}, {
"type" : "WEB",
"url" : "https://github.com/corazawaf/coraza/releases/tag/v3.8.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-772" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-08T17:52:00Z",
"nvd_published_at" : null
}
}