QuizNot attempted
Who is exposed to CSRF?
1–4 to choose, Enter to submit
Show answer & explanation
Correct answers:
- Session id in a cookie
- JWT stored in a cookie
- CSRF works because the browser attaches cookies automatically, even to requests started by evil.com, so any cookie-based auth is exposed, whether the cookie holds a session id or a JWT.
- Not Bearer header from memory: the browser never adds an Authorization header on its own, so a forged cross-site request arrives unauthenticated.
- Not any app with CORS: CORS controls reading responses
- it neither causes nor prevents CSRF.