Vulnérabilité dans github.com/corazawaf/coraza/v3 (CVE-2026-107834)
Résumé
Vulnérabilité dans github.com/corazawaf/coraza/v3 (CVE-2026-107834). Risque d'opérations non autorisées ou de divulgation. Exploitable via for. Atténuation : mise à jour vers 3.8.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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 MULTIPART_STRICT_ERROR to 1 and rule 200001 starts returning 400s, including on legitimate requests hitting the same condition.
Details
internal/bodyprocessors/multipart.go, line 69:
for {
p, err := mr.NextPart()
// ...
temp, err := os.CreateTemp(storagePath, "crzmp*")
defer temp.Close() // wrong scope
io.Copy(temp, p)
}
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 io.Copy instead of deferring it.
PoC
Tested on v3.7.0 (db9850b), Go 1.25, Linux x86_64.
Add this file at internal/bodyprocessors/poc_fd_test.go and run:
go test -v -run TestMultipartFDLeak ./internal/bodyprocessors/...
package bodyprocessors_test
import (
"fmt"
"os…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-107834 a été découverte dans github.com/corazawaf/coraza/v3.
Des attaquants peuvent cibler un point d'entrée spécifique comme for à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 5.3/10.
Action : mettez à jour github.com/corazawaf/coraza/v3 vers 3.8.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/corazawaf/coraza/v3 CVE-2026-107834 » sur le site de l'éditeur.
CVE-2026-107834 (github.com/corazawaf/coraza/v3) — CWE-400 / CVSS v3 5.3
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : for / EMFILE / MULTIPART_STRICT_ERROR / ProcessRequest
Correctif : 3.8.0 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-400) affecte github.com/corazawaf/coraza/v3. Les attaquants atteignent le code vulnérable via for sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/corazawaf/coraza/v3. Surface d'attaque : for / EMFILE / MULTIPART_STRICT_ERROR / ProcessRequest.
Gravité : Moyenne (CVSS 5.3/10). Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 3.8.0.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'github.com/corazawaf/coraza/v3' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/corazawaf/coraza/v3を grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/corazawaf/coraza/v3 to 3.8.0ステージング環境で 3.8.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com