V3: Coraza: Resource exhaustion via deferred file handle accumulation in multipart body processor
Description
A resource exhaustion vulnerability exists in Coraza v3 multipart body processor due to deferred file handle closures inside a loop. This causes file descriptors to accumulate until the request processing completes, potentially exhausting the file descriptor limit and causing denial of service. The issue affects all v3.x releases before 3.8.0. The vulnerability can trigger false positives in the Core Rule Set (CRS) and block legitimate multipart requests. A patch is available to fix the improper defer usage.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In Coraza v3 multipart body processor, temporary files are created for each multipart section with their closures deferred inside a loop. Since Go defers execute only at function return, all file descriptors remain open simultaneously during processing, leading to exhaustion of the file descriptor table (EMFILE error) when processing many parts. This triggers the MULTIPART_STRICT_ERROR flag and causes CRS rule 200001 to block requests with HTTP 400 responses, including legitimate ones. The vulnerability affects versions >=3.0.0 and <3.8.0. The fix involves explicitly closing each temporary file immediately after copying its content instead of deferring the close.
Potential Impact
No authentication is required to exploit this vulnerability. Any endpoint accepting multipart uploads can be targeted. When the file descriptor limit is exhausted (around 65,000 parts or ~6.8MB body), temporary file creation fails, setting MULTIPART_STRICT_ERROR and causing CRS rule 200001 to block requests with 400 errors. This can lead to denial of service affecting the entire process, as no new files or sockets can be opened while the file descriptor table is full. Legitimate multipart requests may be falsely blocked, causing operational disruption.
Mitigation Recommendations
A patch is available that fixes the issue by closing temporary files explicitly after copying instead of deferring the close. Users should upgrade to Coraza v3.8.0 or later where this issue is resolved. Until patched, mitigating this vulnerability is difficult as it is inherent to the multipart processor implementation. Monitoring multipart request sizes and counts may help reduce risk but is not a full mitigation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-rp9v-7xv3-r6g3
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6ac80fb92cdf04f65639c2ab
Added to database: 10/08/2026, 21:48:41 UTC
Last enriched: 10/08/2026, 22:11:19 UTC
Last updated: 10/08/2026, 22:11:19 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.