Nginx/Apache: ModSecurity: Access denied with code 403 (phase 2). Matched "Operator GE matched 5 at TX:anomaly_score"
The ModSecurity WAF (OWASP Core Rule Set) blocked the request as suspicious.
ModSecurity: Access denied with code 403 (phase 2)ModSecurity: Access denied with code 406[id "942100"] [msg "SQL Injection Attack Detected via libinjection"]ModSecurity: Warning. Matched phraseAccess denied with code 403 (phase 2). Matched "Operator GE matched Meaning
Read the audit log (/var/log/modsec_audit.log or Apache/Nginx error log) for the rule ID ([id "942100"]). If it's a false positive, tune the rule: SecRuleRemoveById 942100 for that location, adjust the anomaly threshold, or whitelist parameters. Don't disable the WAF globally.
Common causes
- CRS rule (SQLi/XSS) matching legitimate input
- JSON/WYSIWYG content tripping rules
- Anomaly score threshold too strict
- API clients with unusual headers
- File uploads
⚡ Quick fix
- Find the rule id in the log and exclude it for that path:
SecRuleRemoveById 942100 - Use
SecRuleUpdateTargetByIdto exclude a parameter - Raise the anomaly threshold gradually; test with
DetectionOnlyfirst
Detailed fix by platform
Apache
SecRuleEngine DetectionOnlywhile tuning; then<LocationMatch "/admin/save"> SecRuleRemoveById 942100 </LocationMatch>
How to diagnose
- Rule ID — In the log?
- Input — Legitimate?
- Scope — Narrow exclusion?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Nginx / Apache
- AH00072: make_sock: could not bind to address 0.0.0.0:80 Apache: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 / AH00015: Unable to open logs
- AH00898: Error reading from remote server (502 Proxy Error) Apache: [proxy_http:error] AH01102: error reading status line from remote server 127.0.0.1:3000 / AH00898: Error reading from remote server returned by /api
- AH01114: HTTP: failed to make connection to backend Apache: [proxy:error] AH00957: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed / AH01114: HTTP: failed to make connection to backend: 127.0.0.1
Other ways to find it
Where this error sits
Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026