Web Security interview questions

XSS, CSRF, SQL injection, authentication, password storage, HTTPS and the OWASP Top 10 in plain words.

Readiness: 0 of 11 nailed

How to use this page: 1. Read a question2. Type your answer3. Check with AI4. Open the model answer5. Timed drill when you’re 70% ready

Attacks

JuniorConcept

What is XSS and how do you prevent it?

JuniorConcept

What is CSRF and how do you prevent it?

FoundationConcept

What is SQL injection? Show an example.

SeniorConcept

What is SSRF?

Auth

FoundationConcept

Authentication vs authorisation?

Mid-levelIt’s broken: why?

Find the security bug.

app.get('/api/invoices/:id', requireLogin, async (req, res) => {
  const invoice = await db.invoices.findById(req.params.id);
  res.json(invoice);
});

Overview

Mid-levelConcept

What is the OWASP Top 10? Name a few.

JuniorReal-world scenario

Where should API keys and passwords live in an application?

JuniorConcept

How do you manage vulnerable dependencies?

Transport

JuniorConcept

What does HTTPS protect, and what doesn’t it protect?

Mid-levelConcept

Does CORS protect your API from attackers?

Also prepare