Miggo Logo

CVE-2023-40586: Coraza has potential denial of service vulnerability

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.45818%
Published
6/26/2023
Updated
11/10/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/corazawaf/coraza/v3go>= 3.0.0, < 3.0.13.0.1
github.com/corazawaf/coraza/v2go>= 2.0.0, <= 2.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the error handling in multipartBodyProcessor.ProcessRequest where log.Fatalf was used to handle mime.ParseMediaType errors. The commit diff shows this was replaced with proper error return in the fix (24af0c8). log.Fatalf terminates the process via os.Exit (per Go's log package), making any application using this code vulnerable to crash on malicious inputs. The PoC demonstrates this by triggering a duplicate parameter error in Content-Type parsing.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry *u* to t** misus* o* `lo*.**t*l*`, t** *ppli**tion usin* *or*z* *r*s*** **t*r r***ivin* *r**t** r*qu*sts *rom *tt**k*rs. ### **t*ils *ttps://*it*u*.*om/*or*z*w**/*or*z*/*lo*/****************************************/int*rn*l/*o*ypro**ss

Reasoning

T** vuln*r**ility st*ms *rom t** *rror **n*lin* in `multip*rt*o*yPro**ssor.Pro**ssR*qu*st` w**r* `lo*.**t*l*` w*s us** to **n*l* `mim*.P*rs*M**i*Typ*` *rrors. T** *ommit *i** s*ows t*is w*s r*pl**** wit* prop*r *rror r*turn in t** *ix (*******). `lo*