Threats, Vulnerabilities, and Attacks

A malicious page causes a user's browser to submit a request to a banking site, and the browser automatically attaches the user's session cookie. Which cookie attribute restricts the cookie from being sent on such cross-site requests?

Show the answer

Correct answerC. SameSite

AWhy not this: HttpOnly blocks script from reading the cookie, but the browser still attaches it to requests triggered from another site.

BWhy not this: Expires sets a lifetime and shortens exposure, but the cookie is still sent on cross-site requests while valid.

CWhy this is right: SameSite makes the browser withhold the cookie on cross-site requests, which stops the forged request from carrying the session.

DWhy not this: Secure restricts sending to HTTPS, but a forged request to the HTTPS site still carries the cookie.

SameSite tells the browser not to attach the cookie to requests started from other sites, which blunts cross-site request forgery. HttpOnly only hides the cookie from client-side script; the browser still sends it automatically with forged requests.