What is Cross-Site Request Forgery (CSRF)?
CSRF is an attack that forces a user’s browser to execute unwanted actions on a web application in which they are authenticated. Attackers exploit the trust a website has in a user’s browser.
Prevention Techniques:
- Use anti-CSRF tokens in forms and requests.
- Verify the origin and referer headers of requests.
- Enforce same-site cookie attributes.
- Use Multi-Factor Authentication for sensitive actions.
CSRF can result in unauthorized transactions, data changes, or account compromise if not mitigated.