← All topics

#nonces

4 min read

WordPress Nonces and Capability Checks: CSRF Is Not Authorization

WordPress nonces help prevent CSRF, but they are not one-time tokens and they are not authorization. Verify a nonce with check_admin_referer() or wp_verify_nonce(), and separately call current_user_can() in the request handler. Official documentation says you should always assume a nonce can be compromised.

Get new briefs by email

Short alerts when a PHP or WordPress vulnerability needs action.

Double opt-in via Buttondown; unsubscribe any time. See our privacy policy.