🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: CSRF and CORS: all 10 questions

Quiz: CSRF and CORS · Question 1 of 10

In a CSRF attack, what does the attacker rely on?

In a CSRF attack, what does the attacker rely on?

  1. A.Stealing the session cookie with JavaScript
  2. B.The victim's browser automatically attaching cookies to a forged request
  3. C.Guessing the password
  4. D.A SQL injection bug
Answer & explanation

Correct answer: The victim's browser automatically attaching cookies to a forged request

The attacker never reads the cookie; the browser sends it along with the request the malicious page triggers.

Can you get the rest right without peeking?

Take the timed Quiz: CSRF and CORS quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →