Cross-Site Request Forgery (CSRF) High

Cross-site request forgery (CSRF) vulnerabilities allow attackers to perform unauthorized actions by exploiting weaknesses in request validation and loose restrictions. Failure to properly validate inputs like tokens or origins and enabling unsafe methods without route restrictions makes it possible for attackers to construct requests that users unknowingly execute while authenticated. Fixing these issues requires adding comprehensive validation of tokens, origins, and other inputs as well as tighter restrictions on routes, HTTP methods, and CORS policies. Implementing robust validation and restrictions makes it difficult for attackers to trick users into taking unintended actions through CSRF attacks.

Detector ID
go/cross-site-request-forgery@v1.0
Category
Common Weakness Enumeration (CWE) external icon