Vulnérabilité dans github.com/corazawaf/coraza/v3 (CVE-2026-41504)
Résumé
Vulnérabilité dans github.com/corazawaf/coraza/v3 (CVE-2026-41504). Risque d'opérations non autorisées ou de divulgation. Exploitable via formats_json.go. 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).
Root Cause
File: internal/auditlog/formats.go — multiple sites write attacker-influenced bytes into the Native audit-log stream without escaping \r or \n:
// Part B — request headers (lines 72–80)
for k, vv := range al.Transaction().Request().Headers() {
for _, v := range vv {
res.WriteByte('\n')
res.WriteString(k)
res.WriteString(": ")
res.WriteString(v) // ← raw
}
}
// Part C — request body (lines 85–86)
if body := al.Transaction().Request().Body(); body != "" {
res.WriteString(body) // ← raw
res.WriteByte('\n')
}
// Part E — response body (lines 93–94) raw
// Part F — response headers (lines 111–118) raw
// Part H — error messages (line 125) raw
// Part K — matched-rule raw data (line 151) raw
The Native format's section structure is line-based: sections are delimited by lines of the form --<10-char-random-prefix>---, and line-based log parsers / SIEM rules rely on that structure. Any attacker-controlled bytes containing \n break the structural invariant and allow the attacker to inject lines that look like genuine audit content.
The other two Native-format implementations in Coraza are not affected: the JSON formatter (formats_json.go) and the OCSF formatter both round-trip values through json.Marshal, which escapes \r and \n.
Impact
An attacker who can land bytes into any of the listed audit-log fields can inject arbitrary lines — including lines that visually rese…
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-41504 a été découverte dans github.com/corazawaf/coraza/v3.
Des attaquants peuvent cibler un point d'entrée spécifique comme formats_json.go à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 5.8/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-41504 » sur le site de l'éditeur.
CVE-2026-41504 (github.com/corazawaf/coraza/v3) — CWE-93 / CVSS v3 5.8
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : formats_json.go / json.Marshal / boundaryPrefix / ABCFHZ
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-93) affecte github.com/corazawaf/coraza/v3. Les attaquants atteignent le code vulnérable via formats_json.go sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/corazawaf/coraza/v3. Surface d'attaque : formats_json.go / json.Marshal / boundaryPrefix / ABCFHZ.
Gravité : Moyenne (CVSS 5.8/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 でアラート再発が無いか継続監視。