Skip to content

← Actionable
Medium, CVSS 5.3amended

Coraza: Resource exhaustion via deferred file handle accumulation in multipart body processor

CVE-2026-107834GHSA-rp9v-7xv3-r6g3

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Go github.com/corazawaf/coraza/v3

    Affected
    >= 3.0.0, < 3.8.0
    Fixed in
    3.8.0
  • Go github.com/corazawaf/coraza

    Affected
    every version
    Fixed in
    no fixed version recorded
  • Go github.com/corazawaf/coraza/v2

    Affected
    every version
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS
  • CVE-2026-107834: 0.32% estimated exploitation activity in the next 30 days; percentile 25.30 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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 MULTIPARTSTRICTERROR to 1 and rule 200001 starts returning 400s, including on legitimate requests hitting the same condition. Details internal/bodyprocessors/multipart.go, line 69: Each 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. The 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. Fix is straightforward: call temp.Close() explicitly after…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-rp9v-7xv3-r6g3

  2. Revision 2 · amended ·

    Amended from osv record GO-2026-6697

  3. Revision 1 · created ·

    Published from osv record GHSA-rp9v-7xv3-r6g3

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-107834

Advisory: Coraza: Resource exhaustion via deferred file handle accumulation in multipart body processor
IDs: CVE-2026-107834, GHSA-rp9v-7xv3-r6g3
Record: https://patchnext.com/advisories/cve-2026-107834 (revision 3, source checked 26 Oct 2026, 15:32 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: github.com/corazawaf/coraza/v3 3.8.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/corazawaf/coraza/v3: affected >= 3.0.0, < 3.8.0; fixed in 3.8.0
- Go github.com/corazawaf/coraza: affected every version
- Go github.com/corazawaf/coraza/v2: affected every version

## Suggested inspection (read-only)
- Go github.com/corazawaf/coraza/v3: check the installed version with your package manager.
- Go github.com/corazawaf/coraza: check the installed version with your package manager.
- Go github.com/corazawaf/coraza/v2: check the installed version with your package manager.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/corazawaf/coraza/v3, github.com/corazawaf/coraza, github.com/corazawaf/coraza/v2.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GO-2026-6697 (OSV record GO-2026-6697 lists affected ranges: Go github.com/corazawaf/coraza >=0; Go github.com/corazawaf/coraza/v2 >=0; Go github.com/corazawaf/coraza/v3 >=3.0.0 <3.8.0 (fixed))
- Verified: https://osv.dev/vulnerability/GHSA-rp9v-7xv3-r6g3 (OSV record GHSA-rp9v-7xv3-r6g3 lists affected ranges: Go github.com/corazawaf/coraza/v3 >=3.0.0 <3.8.0 (fixed))
- Verified: https://github.com/advisories/GHSA-rp9v-7xv3-r6g3 (GitHub-reviewed advisory GHSA-rp9v-7xv3-r6g3 lists affected ranges: Go github.com/corazawaf/coraza/v3 >=3.0.0 <3.8.0)

Commands are suggestions: review each one before running it.

Loading voting…