Moodle is refused by the firewall when saving course settings (Inbound Anomaly Score Exceeded, groupmodeforce)
Why saving a Moodle course's settings was answered with 403, which rule fired, and how to confirm the fix.
Teachers saving a course's settings in Moodle (/course/edit.php) get an error, and the nginx error log shows ModSecurity: Access denied with code 403 with Inbound Anomaly Score Exceeded (Total Score: 10).
What it means
The score of 10 comes from one rule, 932260, "Direct Unix Command Execution". It matches the text groupmod inside two of Moodle's own setting names, groupmode and groupmodeforce (the course's group mode options). It is reading the name of the form field, not anything a person typed, so nothing is being attacked. The same save fails on every Moodle site on the server.
The server already carried an exemption for exactly those two names, and it was loaded, but it did not work. It looked for the field before the form had been read, and Moodle sends these two names in the body of the request. The 8 October 2026 build removes that dependency. The exemption is still only for those two names, and only for that one rule. The value of the field and every other check stay on.
Steps
- To see which rule is refusing a save, search the audit log (it is large, so allow a minute):
sudo grep -a 'uri "/course/edit.php"' /var/log/nginx/modsec_audit.log | tail -40 | grep -aoE '\[id "[0-9]+"\]|\[msg "[^"]*"\]|\[data "[^"]*"\]'
Rule 932260 withgroupmod found within ARGS_NAMES:groupmodeforceis this problem. - Upgrade the server to the build dated 8 October 2026 or later:
sudo jsopctl upgrade
- Save a course's settings again. It should save with no error.