Difficulty: Intermediate
What is the OWASP Top 10, what categories does it cover, and why should a developer care about it?
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 2025 edition replaced the 2021 list. The categories are:
| Rank | Category | Typical example |
|---|---|---|
| A01 | Broken Access Control | IDOR, missing role checks, SSRF (now folded in here) |
| A02 | Security Misconfiguration | Default admin passwords, verbose stack traces, open S3 buckets |
| A03 | Software Supply Chain Failures | Compromised npm package, unpinned dependencies, poisoned CI |
| A04 | Cryptographic Failures | Plain HTTP, MD5 password hashes, hardcoded keys |
| A05 | Injection | SQL injection, XSS, OS command injection |
| A06 | Insecure Design | No rate limit on OTP verification by design |
| A07 | Authentication Failures | Credential stuffing, weak session handling |
| A08 | Software or Data Integrity Failures | Unsigned updates, insecure deserialization |
| A09 | Security Logging and Alerting Failures | No alert when 10,000 logins fail in a minute |
| A10 | Mishandling of Exceptional Conditions | Failing 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.
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.
npm audit or Dependabot map their findings to Top 10 categories.// 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.
# 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.
OWASP Top 10, Broken Access Control, Injection, Security Misconfiguration, Supply Chain Failures