cross-site request forgery

An attack where another website makes a logged-in user’s browser send an unwanted request that carries their cookies automatically.

It lets an attacker act as a logged-in user without stealing their credentials.

In more detail

Because browsers attach cookies by themselves, a cookie-based session can be abused from a hostile page. SameSite cookies, anti-forgery tokens and refusing state changes on GET are the usual defences; bearer tokens in a header are not sent automatically.

Related terms

Taught in

References