GHSA-5gj4-9gm7-2fx2: Coraza body processor has a JSON key collision that allows unauthenticated attackers to bypass OWASP CRS inspection
Coraza’s JSON body processor converts nested JSON properties into dot-separated ARGS_POST names without escaping dots contained in literal property names. Two distinct JSON properties can therefore collapse into the same Coraza variable
An unauthenticated attacker can place a malicious value in a nested property and then overwrite only Coraza’s representation with a harmless dotted property:
{
"account": {
"role": "1' OR '1'='1"
},
"account.role": "safe"
}
Coraza stores both properties as ARGS_POST:json.account.role; the later value safe replaces the SQL-injection value. Standard backend JSON parsers preserve the two distinct properties and expose the malicious nested value as account.role.
This bypasses the complete current OWASP Core Rule Set (CRS) for the hidden value. In the supplied control-pair PoC, CRS v4.25 blocks the nested SQL-injection value with rule 949110. Adding the dotted decoy makes the same attack pass with no interruption, while Go’s standard JSON parser still returns the malicious nested value.
References
- github.com/advisories/GHSA-5gj4-9gm7-2fx2
- github.com/corazawaf/coraza/commit/52af139cab5ad10c5cb0152a161063b523907bdf
- github.com/corazawaf/coraza/commit/5f577a548aeb9ca836122df4258f93ef6cfab38a
- github.com/corazawaf/coraza/commit/cae3c7407e7b84372c207033de03f15f89bf351a
- github.com/corazawaf/coraza/releases/tag/v3.8.1
- github.com/corazawaf/coraza/security/advisories/GHSA-5gj4-9gm7-2fx2
Code Behaviors & Features
Detect and mitigate GHSA-5gj4-9gm7-2fx2 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →