REST requests that change data use write methods: POST, PUT, PATCH, and DELETE. On many sites, no anonymous visitor should ever need to do that. Require WordPress authentication for write methods unless allowlisted enforces that rule. It is in Aegisify WAF → API & Application → REST Protection (Pro).
How it works
When enabled (along with REST hardening):
- A REST request from a visitor who is not logged in,
- using any method other than GET, HEAD, or OPTIONS,
- to a route not in the REST route allowlist,
is blocked with HTTP 403, and a wp_protect event with the reason unauthenticated_write is logged.
Why it helps
Many plugin vulnerabilities involve a REST endpoint that accepts anonymous writes because of a missing permission check. Requiring authentication for writes closes that whole class of attack at the WAF, even before the plugin is patched.
What can break
Legitimate anonymous writes are common:
- Contact and newsletter forms that submit through REST.
- WooCommerce Store API cart and checkout endpoints (
/wc/store/...). - Comment or rating plugins.
- Incoming webhooks from payment or CRM services.
Before enabling, list these routes and add them to the REST route allowlist, for example /wc/store/* or /contact-form-7/v1/*.
Test plan
Enable the setting, then submit each public form, add to cart, and complete a test checkout. Check Logs / Attack Story for unauthenticated_write blocks you did not expect.
Related: Require JSON content type, Logged-in bypass.
