Imagine you're logged into your banking app. In another tab, you visit a malicious website. That website contains hidden code that submits a form to your bank: "Transfer $10,000 to attacker's account." Because you're logged in, your browser automatically sends your session cookie, and the bank processes the transfer.
This is Cross-Site Request Forgery—tricking your browser into making requests you didn't intend.
Router DNS Hijacking (2008): A CSRF vulnerability in several home routers allowed attackers to change router DNS settings by tricking users into visiting a malicious website. Victims lost no money but were redirected to phishing sites for months. Millions of routers were affected.
Implementare la protezione Cross-Site Request Forgery (CSRF) per i percorsi API. Utilizza questa competenza quando è necessario proteggere gli endpoint POST/PUT/DELETE, implementare la convalida dei token, prevenire attacchi tra siti o proteggere l'invio di moduli. I trigger includono "CSRF", "falsificazione di richieste intersito", "proteggi modulo", "convalida token", "withCsrf", "token CSRF", "fissazione della sessione". Fonte: harperaa/secure-claude-skills.