---
id: "CVE-2026-41504"
kind: "vulnerability"
aliases: ["CVE-2026-41504", "GHSA-prpw-wwv7-xjjr", "GO-2026-6669"]
title: "Coraza: Native audit-log format allows CRLF injection and log forgery via request body and header fields in github.com/corazawaf/coraza"
severity: "medium"
cvss: 5.8
epss: 0.00392
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/corazawaf/coraza", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/corazawaf/coraza/v2", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/corazawaf/coraza/v3", "fixed": ["3.8.0"], "affected": ">= 3.0.0, < 3.8.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["coraza", "go", "modsecurity", "package", "self-hosted", "waf"]
not_affected_if: ["audit-log-format-not-native", "coraza-3.8.0-or-later", "coraza-below-3.0.0"]
published_at: "2026-10-12T21:17:17+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T19:58:07+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6669", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-41504", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41504", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# Coraza: Native audit-log format allows CRLF injection and log forgery via request body and header fields in github.com/corazawaf/coraza

Coraza's Go WAF library writes attacker-controlled request and response fields into its Native audit log without stripping CR/LF characters, so injected line breaks can create forged lines inside a transaction record. The result is log forgery that can mislead operators and line-based SIEM parsing, not direct code execution or session takeover.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/corazawaf/coraza affected all versions fixed ?
- go:github.com/corazawaf/coraza/v2 affected all versions fixed ?
- go:github.com/corazawaf/coraza/v3 affected >= 3.0.0, < 3.8.0 fixed 3.8.0

## How to check

Check go.mod for github.com/corazawaf/coraza/v3 at a version >= 3.0.0 and < 3.8.0 (go list -m github.com/corazawaf/coraza/v3)
Check whether SecAuditLogFormat Native is enabled in the WAF configuration

## Fix

Upgrade github.com/corazawaf/coraza/v3 to 3.8.0 or later

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6669
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-41504
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-41504

## From the sources

OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. From 3.0.0 until 3.8.0, the Native audit-log formatter in internal/auditlog/formats.go writes attacker-influenced request and response fields without neutralizing carriage returns or line feeds. When SecAuditLogFormat Native is enabled, injected line breaks can create forged lines inside a transaction record. An attacker who controls request or response body, header, error-message, or matched-rule data can inject carriage returns and line feeds that appear as forged audit lines within a transaction record. The forged content can mislead operators and line-oriented SIEM processing, although the unpredictable transaction boundary prevents straightforward impersonation of a separate complete session. This issue is fixed in version 3.8.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
