Security Interview Questions
Practice access control, session revocation, SSRF, CSRF, XSS and CSP, password hashing, SQL injection, and TLS validation with free security interview questions. Each exercise includes hints and a checked explanation.
Practice questions
- GET /invoices/{id} checks login. Why can another tenant read it? · Access control · 8 min
- A user signed out. Why does their old JWT still work? · Session management · 10 min
- How do you narrow an export worker with s3:* and db:admin? · Least privilege · 10 min
- How do you rotate a webhook HMAC secret with zero downtime? · Secret rotation · 10 min
- A debug log leaked Bearer tokens. How do you log safely? · Safe logging · 8 min
- A dependency upgrade passed CVE scans. Why can security still break? · Dependency upgrades · 10 min
- URL check blocks "localhost". Why can SSRF still hit cloud metadata? · SSRF defense · 10 min
- CORS blocks other origins. Why does CSRF still hit POST /account/email? · CSRF defense · 10 min
- Regex strips <script> tags. Why does XSS still run? · XSS and CSP · 10 min
- Salted SHA-256 hashes passwords. Why can a leak still crack them? · Password storage · 10 min
- WHERE uses ? placeholders. Why is ORDER BY still SQL-injectable? · SQL injection · 10 min
- Client set check_hostname = False for staging. What breaks in production? · Transport security · 10 min
How to practice
Predict the result or explain what you would change before opening the hints. Then compare your reasoning with the answer and try the follow-up question.