Get your free beta license ↗
Websites · ModSecurity

A form or an admin page returns 403 Forbidden

Last updated 30 Nov 2026
Summary

Saving a page or submitting a form returns 403 Forbidden because ModSecurity treats the request as an attack. One command shows which rule matched, and another disables it for the domain.

Symptoms

The request returns 403 Forbidden while the rest of the site works. When you run urbestack-domain-log --name example.com --type error, the domain's error log shows a line like this.

Output
ModSecurity: Access denied with code 403 (phase 2). Operator GE matched 5 at TX:blocking_inbound_anomaly_score. [file "/usr/local/urbestack/modsec/coreruleset/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "233"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 5)"]

Cause

In blocking mode, ModSecurity adds to the request's score for each matching rule in the OWASP Core Rule Set. Rule 949110 totals the score and refuses the request when it reaches the limit.

The error log line names only the rule that enforces the limit. The list of refused requests shows which rule matched.

Resolution

  1. List the domain's refused requests. For each matching rule, the list shows its id and message, where it matched in matched_in, and what it matched in matched_text. The list updates every minute.

    urbestack-modsec-requests --domain example.com --state refused
  2. For example, rule 942100 with the message SQL Injection Attack Detected via libinjection matched in ARGS:id.

  3. If the request came from the site itself, disable the matching rule for the domain.

    urbestack-modsec-disabled-rule-add --rules 942100 --domain example.com
  4. Never disable rule 949110. Disabling it would stop every refusal.

  5. Repeat the request to check whether it still returns 403 Forbidden. If you need to keep testing, you can set ModSecurity to log the domain's matches without blocking requests.

    urbestack-domain-modsec-set --name example.com --mode logging
  6. Use --mode follow to return the domain to the server's mode.

  7. To enable the rule again, run urbestack-modsec-disabled-rule-del --rule 942100 --domain example.com.