Content type
application/json
Original WAFWiki lab
Hands-on JSON request-body test showing how ModSecurity and Coraza handled one clean body plus controlled SQLi-like and XSS-like fields under OWASP CRS 4.25.0.

Evidence policy
WAFWiki separates verified smoke-test results from architecture diagrams and methodology notes. A smoke test proves one narrow local path; it does not claim full production readiness.
Environment
application/json
POST /anything on go-httpbin 2.21.0
OWASP CRS 4.25.0 on both stacks, request-body inspection enabled by the selected defaults
ModSecurity 3.0.16 + ModSecurity-nginx 1.0.4
Coraza 3.7.0 + coraza-caddy 2.5.0 + Caddy 2.11.2
Clean order note, SQLi-like username field, and XSS-like comment field
Commands
curl -i -X POST -H 'Content-Type: application/json' \
--data '{"name":"Alice","note":"order 123"}' \
http://127.0.0.1:18182/anythingThe clean JSON body returns HTTP 200 through the Coraza path in this recorded configuration.
scripts/run-waf-evidence-lab.shThe script sends the same three JSON bodies through both WAF stacks and records six decisions.
awk -F, 'NR == 1 || $2 ~ /json/ { print }' \
docs/lab-evidence/waf-engine-comparison-2026-07-26-requests.csvSix JSON rows are shown: two clean HTTP 200 decisions and four controlled HTTP 403 decisions.
Observed result
Clean JSON body
The same benign order-style JSON object reached the upstream through both stacks.
SQLi-like JSON field
Both stacks identified the username field with CRS rule 942100 and exceeded the blocking threshold.
XSS-like JSON field
Both stacks identified the comment field with CRS rule 941100; additional XSS rules also appeared in logs.
Parsed field evidence
Logs referenced ARGS:json.username and ARGS:json.comment rather than treating the body as an opaque string.
clean body: {name: Alice, note: order 123} -> 200 on both stacks
SQLi-like field: json.username -> CRS 942100 -> 403 on both stacks
XSS-like field: json.comment -> CRS 941100 -> 403 on both stacks
blocking evaluation: CRS 949110
JSON decisions: 6 total, 6 matched expectationsEvidence context
The evidence confirms body-field parsing for these three objects. It does not establish behavior for every JSON shape, content-type variation, parser ambiguity, or body-size limit.

Open evidence
The files expose the status matrix and versioned summary without publishing raw container logs or unrelated local data.
Twenty request outcomes with engine, case, method, path, expected status, observed status, and curl time.
Pinned image IDs, component versions, host details, request results, latency samples, resource snapshots, and limitations.
Limitations
Related research