The OWASP Top 10 is the most widely cited list of web application security risks. It's built from vulnerability data contributed by security firms and from a community survey, and it's updated every few years. The current edition, the OWASP Top 10:2025, was released in late 2025. This lesson walks through all ten categories as a developer would meet them: what the category means, a typical bug, and how to prevent it. It also explains what the Top 10 is not, and when to reach for the OWASP Application Security Verification Standard instead.
Before you start
You should have finished the Basic level, especially Your First Website Security and Privacy Audit. The examples use TypeScript on Node.js; the ideas apply to any stack.
What the Top 10 is, and isn't
The Top 10 is an awareness document. Each entry is a category that groups many related weaknesses, identified by their Common Weakness Enumeration (CWE) numbers. Its purpose is to point developers and teams at the risks that cause the most real-world harm.
It isn't a complete standard, a testing checklist, or a compliance requirement. An application with none of the ten problems can still be badly insecure in other ways, and "Top 10 compliant" isn't a meaningful claim. When you need specific, testable requirements, use the OWASP ASVS (Application Security Verification Standard), whose version 5.0.0 was released in May 2025 with about 350 requirements in 17 chapters and three verification levels.
What changed since 2021
The 2025 edition keeps most of the 2021 structure, with a few notable changes:
- Software Supply Chain Failures (A03) is new. It widens 2021's "Vulnerable and Outdated Components" to the whole chain: dependencies, build systems, and distribution.
- Mishandling of Exceptional Conditions (A10) is new. It covers error handling, failing open, and unexpected states.
- Server-Side Request Forgery is no longer its own category; it's been rolled into Broken Access Control.
- Security Misconfiguration climbed from fifth to second place.
- Two categories were renamed: "Identification and Authentication Failures" is now Authentication Failures, and "Security Logging and Monitoring Failures" is now Security Logging and Alerting Failures, emphasizing that logs nobody acts on don't help.
The ten categories of 2025
Each section below gives a typical bug and the main defense. Later lessons go deeper on several of them.
A01: Broken Access Control
Users can act outside their permissions: read another user's records, reach admin functions, or change data they shouldn't. It's been the top category since 2021 and now explicitly includes server-side request forgery.
A typical bug is an endpoint that loads an object by ID without checking ownership:
// INSECURE TEACHING EXAMPLE: any signed-in user can read any invoice by changing the ID.
app.get("/api/invoices/:id", requireSession, async (req, res) => {
res.json(await db.invoice.findUnique({ where: { id: req.params.id } }));
});The fix is to scope every query to what the current user may access, and deny by default:
app.get("/api/invoices/:id", requireSession, async (req, res) => {
const invoice = await db.invoice.findFirst({ where: { id: req.params.id, accountId: req.session.accountId } });
if (!invoice) return res.sendStatus(404);
res.json(toInvoiceResponse(invoice));
});Covered in depth in lesson 9, Secure Authentication, Authorization, and Session Management.
A02: Security Misconfiguration
Insecure settings anywhere in the stack: default credentials, verbose error pages, unnecessary features left on, overly permissive cloud storage, missing security headers, or a debug mode in production. Prevention is a repeatable, automated configuration: the same hardened settings in every environment, unused features removed, and configuration checked in CI rather than by hand.
A03: Software Supply Chain Failures
Your application depends on hundreds of packages, build tools, and services. Risks include known-vulnerable dependencies, malicious packages (typosquats and hijacked maintainer accounts), compromised build pipelines, and unverified artifacts. Defenses include lockfiles, dependency scanning, a software bill of materials, pinned CI actions, and least-privilege build credentials. Lesson 13 covers this category.
A04: Cryptographic Failures
Sensitive data exposed because cryptography is missing, weak, or misused: passwords hashed with MD5, data sent over plain HTTP, hard-coded keys, home-made encryption, or predictable random numbers. Use TLS everywhere, password hashing functions like Argon2id for passwords, vetted libraries with authenticated encryption such as AES-GCM for data, and a cryptographically secure random generator (crypto.randomBytes or crypto.getRandomValues) for tokens.
A05: Injection
Untrusted input is interpreted as code or commands: SQL injection, OS command injection, LDAP injection, and cross-site scripting (which OWASP includes here). The root cause is mixing data and instructions in one string. The defense is to keep them separate: parameterized queries, safe APIs that don't invoke a shell, and context-aware output encoding. Lessons 7 and 8 cover SQL injection and XSS.
A06: Insecure Design
Flaws in the design itself, which perfect code can't fix: a password reset that relies on guessable security questions, a checkout that trusts a price sent by the browser, or a feature with no limit on how often it can be used. The defense is to think about abuse during design, through threat modeling, secure design patterns, and abuse-case tests. Lesson 11 is about this.
A07: Authentication Failures
Weaknesses in confirming who a user is: permitting credential stuffing and brute force, weak or default passwords, missing MFA, sessions that never expire, or recovery flows that bypass the second factor. Defenses are covered in lessons 3 and 9: modern password rules, MFA and passkeys, rate limiting, and well-managed sessions.
A08: Software or Data Integrity Failures
Code or data trusted without verifying its integrity: auto-updates without signature checks, scripts loaded from a CDN without integrity checks, or deserializing untrusted data into objects. Verify signatures, use Subresource Integrity for third-party scripts you can't host yourself, and never deserialize untrusted input with formats that can instantiate arbitrary types.
<script
src="https://cdn.example.test/lib@4.2.1/lib.min.js"
integrity="sha384-REPLACE_WITH_THE_PUBLISHED_HASH"
crossorigin="anonymous"></script>A09: Security Logging and Alerting Failures
Attacks that go unnoticed because security events aren't logged, logs aren't monitored, or alerts don't reach anyone. Log authentication events, access-control failures, and input validation failures; protect logs from tampering; keep personal data out of them; and make sure someone acts on alerts. Lesson 15 covers this.
A10: Mishandling of Exceptional Conditions
Bugs in how the application behaves when something unexpected happens: an error that skips an authorization check (failing open), a stack trace with internal details returned to the user, a half-finished transaction that leaves data inconsistent, or a resource limit nobody handles.
// INSECURE TEACHING EXAMPLE: if the permission service is down, everyone is allowed.
async function canEdit(userId: string, docId: string) {
try {
return await permissions.check(userId, "edit", docId);
} catch {
return true;
}
}async function canEdit(userId: string, docId: string): Promise<boolean> {
try {
return await permissions.check(userId, "edit", docId);
} catch (error) {
logger.error({ event: "authz.check_failed", userId, docId }); // no secrets or request bodies
return false; // fail closed
}
}Using the Top 10 in your team
- Training: walk through one category per week with an example from your own codebase.
- Code review: add a short checklist based on the categories that matter most for your stack.
- Requirements: when you need verifiable requirements, pick an ASVS level (Level 1 for most applications, higher for sensitive ones) and track which requirements you meet.
- Testing: map automated and manual tests to categories, so you can see where coverage is thin.
Common mistakes and troubleshooting
- Treating the Top 10 as a checklist. It's ten broad categories, not ten tests. Use ASVS for verification.
- Claiming "OWASP compliance". There is no such certification for the Top 10.
- Relying on a scanner for A01 and A06. Access control and design flaws need human review and tests with multiple accounts.
- Citing the 2021 categories as current. The 2025 numbering differs; Security Misconfiguration is now A02, Injection A05.
- Fixing instances, not causes. If one endpoint misses an ownership check, look for the pattern everywhere and fix it in a shared layer.
If a finding doesn't fit neatly into one category, don't worry. Many bugs touch several; the categories exist to guide attention, not to classify perfectly.
Practical exercise: map your application
For an application you work on, write one line per category: where the risk could appear in your code, what defense you have, and how you'd know if it failed. Mark each line as "covered," "partly," or "unknown." Then pick the two "unknown" lines with the highest impact and look into them this week.
Key takeaways
- The OWASP Top 10:2025 is an awareness document of ten risk categories, not a standard or a checklist.
- New in 2025: Software Supply Chain Failures and Mishandling of Exceptional Conditions; SSRF is now part of Broken Access Control.
- Broken Access Control remains the top category; check ownership on the server for every object.
- Use OWASP ASVS 5.0 when you need specific, testable security requirements.
References
- OWASP Top 10:2025 (opens in a new tab)
- OWASP Application Security Verification Standard 5.0 (opens in a new tab)
- OWASP Cheat Sheet Series (opens in a new tab)
- MITRE Common Weakness Enumeration (CWE) (opens in a new tab)
- MDN: Subresource Integrity (opens in a new tab)
What's next
Injection is one of the oldest risks on the list and still one of the most damaging. SQL Injection and Secure Database Queries Explained shows exactly how it works, why escaping isn't the answer, and how to prove your fix.

