Sunday 06 December 2026 04:06:40 GMT+01:00

Netcrook

HomeManifesto
News
Techcrook
Geocrook
WikicrookTeamAppContact
EnglishItaliano

WIKICROOK

Nonce

A security token used to reduce request-forgery risk, but not a replacement for access control.

A nonce is a security token added to a request to show that it was generated by the expected application flow. In web security, especially in WordPress, nonces are commonly used on forms, AJAX calls, and other state-changing actions to reduce request-forgery risk. They help the server tell a normal user action from a forged cross-site request.

Nonces matter because they protect intent, not privilege. They are not authentication and they are not authorization: a valid nonce does not prove who the user is, and it does not prove the user may perform the action. Safe code must still check server-side permissions, such as a WordPress capability check, before creating users, changing settings, or touching other sensitive data. Attackers often succeed when a plugin treats a nonce as a substitute for access control. Defenders use nonces as one layer, then enforce strict permission checks and short-lived tokens for sensitive endpoints.

← WIKICROOK index