OWASP Top 10 Overview

Difficulty: Intermediate

Question

What is the OWASP Top 10, what categories does it cover, and why should a developer care about it?

Answer

The OWASP Top 10 is a ranked awareness list of the most critical security risks to web applications, published by the Open Worldwide Application Security Project (OWASP) roughly every three to four years. It is built from vulnerability data contributed by security firms plus a community survey, and it is the de facto baseline that auditors, compliance checklists and secure coding policies refer to. It is not a complete security standard; it is a starting point for what to fix first.

The current list (2025 edition)

The 2025 edition replaced the 2021 list. The categories are:

RankCategoryTypical example
A01Broken Access ControlIDOR, missing role checks, SSRF (now folded in here)
A02Security MisconfigurationDefault admin passwords, verbose stack traces, open S3 buckets
A03Software Supply Chain FailuresCompromised npm package, unpinned dependencies, poisoned CI
A04Cryptographic FailuresPlain HTTP, MD5 password hashes, hardcoded keys
A05InjectionSQL injection, XSS, OS command injection
A06Insecure DesignNo rate limit on OTP verification by design
A07Authentication FailuresCredential stuffing, weak session handling
A08Software or Data Integrity FailuresUnsigned updates, insecure deserialization
A09Security Logging and Alerting FailuresNo alert when 10,000 logins fail in a minute
A10Mishandling of Exceptional ConditionsFailing open on errors, leaking details in exceptions

If an interviewer quotes the 2021 list, the main differences are: SSRF was its own category (A10:2021) and is now part of Broken Access Control, "Vulnerable and Outdated Components" grew into the broader Supply Chain category, and exceptional-condition handling is new. Broken Access Control has stayed at number one since 2021.

Why it ranks risks the way it does

Each category is a group of CWEs (Common Weakness Enumerations), not a single bug. Ranking combines how often the weakness appears in tested apps (incidence rate), exploitability and impact. That is why XSS no longer has its own slot: it is counted under Injection. Knowing this helps you answer "where did XSS go?" without sounding confused.

How teams actually use it

  • Code review checklists: reviewers ask "does this endpoint check ownership?" (A01) and "is this query parameterized?" (A05).
  • Tooling: SAST tools like Semgrep and CodeQL, DAST scanners like OWASP ZAP and dependency scanners like npm audit or Dependabot map their findings to Top 10 categories.
  • Compliance: PCI DSS for payment apps (think any Indian fintech processing cards) expects developers to be trained on common vulnerabilities, and the Top 10 is the usual syllabus.
  • Threat modelling: Insecure Design (A06) pushes teams to think about abuse cases before writing code, for example limiting how many times an OTP can be tried.

Common mistakes when talking about it

  • Treating it as a checklist that makes you "secure" once ticked. It covers the most common risks, not all of them. OWASP ASVS is the verification standard if you need depth.
  • Mixing up the web list with the separate OWASP API Security Top 10 (BOLA, broken object property level authorization, unrestricted resource consumption) or the OWASP Top 10 for LLM Applications (prompt injection and friends).
  • Memorising ranks without being able to give one concrete prevention per category.
Top 5 OWASP risks (2025). The five highest ranked categories in the 2025 edition, most critical first.
  1. A01 Broken Access Control: Users acting outside their permissions, including IDOR and SSRF.
  2. A02 Security Misconfiguration: Unsafe defaults, open storage, verbose errors.
  3. A03 Software Supply Chain Failures: Compromised or vulnerable dependencies and build pipelines.
  4. A04 Cryptographic Failures: Missing or weak encryption and hashing.
  5. A05 Injection: Untrusted input interpreted as code: SQLi, XSS, command injection.

Code examples

Fixing A01 and A05 in one Express handler

// Vulnerable: no ownership check (A01) and string-built SQL (A05)
app.get('/api/orders/:id', async (req, res) => {
  const rows = await db.query(
    `SELECT * FROM orders WHERE id = ${req.params.id}`
  );
  res.json(rows[0]);
});

// Fixed: parameterized query + scoped to the logged-in user
app.get('/api/orders/:id', requireAuth, async (req, res) => {
  const { rows } = await db.query(
    'SELECT * FROM orders WHERE id = $1 AND user_id = $2',
    [req.params.id, req.user.id]
  );
  if (!rows.length) return res.sendStatus(404); // do not reveal existence
  res.json(rows[0]);
});

Two of the top categories often appear in the same line of code. Parameterizing removes injection, and adding `user_id = $2` enforces object-level authorization.

Catching A03 risks in CI

# Fail the build on high severity advisories in production deps
npm audit --omit=dev --audit-level=high

# Install exactly what the lockfile says (no silent upgrades)
npm ci

Lockfiles plus `npm ci` and an audit gate are the cheapest first defence against vulnerable or swapped dependencies.

Key points

  • The OWASP Top 10 is an awareness document, not a full standard; OWASP ASVS is the detailed verification standard.
  • Broken Access Control has been number one since 2021 and still is in the 2025 edition.
  • In 2025, SSRF is folded into Broken Access Control and Software Supply Chain Failures is a new category.
  • XSS is counted under Injection, not as its own category.
  • Separate lists exist for APIs (OWASP API Security Top 10) and LLM applications.

Common follow-up questions

  • Which OWASP category does IDOR fall under, and how would you prevent it?
  • How is the OWASP API Security Top 10 different from the web Top 10?
  • How would you add security checks for these risks into a CI/CD pipeline?
  • Give an example of Insecure Design that no amount of secure coding would fix.

Interview tips

  • Name the top three or four categories confidently and give one real example and one fix for each.
  • Mention that the list was updated in 2025; it signals you keep up, but do not argue over exact ranks.
  • Tie it to your own project: "In my project I enforced ownership checks on every order endpoint" lands better than reciting the list.

Concepts covered

OWASP Top 10, Broken Access Control, Injection, Security Misconfiguration, Supply Chain Failures

More Web Security (OWASP, JWT, XSS, CSRF) questions