OWASP Top 10
The OWASP Top 10 is a regularly updated awareness list of the most critical web application security risks, published by the Open Worldwide Application Security Project. It is built from data on real vulnerabilities plus a community survey, and it has become a common baseline for developer training, code reviews and security requirements in contracts.
The 2021 list
| # | Category | What goes wrong | Main defences | Course lesson |
|---|---|---|---|---|
| A01 | Broken Access Control | Users act outside their permissions (IDOR, missing checks) | Deny by default, server-side checks on every request | Access Control |
| A02 | Cryptographic Failures | Sensitive data unencrypted or weakly protected | TLS everywhere, AES-GCM, slow password hashing | Cryptography section |
| A03 | Injection | Untrusted data interpreted as code (SQL, OS commands, XSS) | Parameterized queries, output escaping, safe APIs | SQL Injection, XSS |
| A04 | Insecure Design | Missing controls by design (no rate limit on coupon redemption) | Threat modeling, abuse cases, secure design patterns | Threat Modeling |
| A05 | Security Misconfiguration | Defaults, debug mode, verbose errors, open storage | Hardened baselines, automation, config review | Secure Coding, Cloud |
| A06 | Vulnerable and Outdated Components | Libraries or servers with known CVEs | Inventory (SBOM), dependency scanning, patching | Vulnerability Management |
| A07 | Identification and Authentication Failures | Credential stuffing, weak sessions, no MFA | MFA, rate limiting, secure session handling | Authentication, Sessions |
| A08 | Software and Data Integrity Failures | Unsigned updates, insecure deserialisation, CI/CD tampering | Signatures, integrity checks, protected pipelines | Digital Signatures |
| A09 | Security Logging and Monitoring Failures | Attacks go unnoticed | Log security events, alert, practise response | Logging & Detection |
| A10 | Server-Side Request Forgery | Server fetches attacker-chosen internal URLs | URL allow-lists, resolved-IP checks, egress filtering | Input Validation |
OWASP updates the list every few years, and a 2025 edition reshuffles some categories (supply-chain failures and mishandling of exceptional conditions gain prominence). The underlying risks change slowly: broken access control, injection and misconfiguration have been near the top for two decades.
Note: The Top 10 is an awareness document, not a complete standard. For detailed, testable requirements use the OWASP ASVS (Application Security Verification Standard); for APIs, see the OWASP API Security Top 10; for LLM applications, the OWASP Top 10 for LLM Applications.
Mapping findings to categories
Security teams tag every finding with a category so they can see where their weaknesses cluster. Here's a small keyword-based tagger and a summary of a fictional code review:
CATEGORIES = {
"A01 Broken Access Control": ["idor", "missing authorization", "privilege"],
"A02 Cryptographic Failures": ["md5", "plain http", "unencrypted"],
"A03 Injection": ["sql", "xss", "command injection"],
"A05 Security Misconfiguration": ["debug", "default password", "public bucket"],
"A06 Vulnerable Components": ["cve-", "outdated"],
"A07 Auth Failures": ["no rate limit on login", "session fixation"],
"A09 Logging Failures": ["no audit log"],
"A10 SSRF": ["ssrf", "fetches user url"],
}
findings = [
"SQL built with f-string in /search",
"IDOR on /api/orders/<id>",
"Passwords hashed with MD5",
"Debug toolbar enabled in production",
"lodash 4.17.15 outdated (CVE-2020-8203)",
"Stored XSS in product reviews",
"No rate limit on login endpoint",
"Image import fetches user URL without checks (SSRF)",
"Missing authorization on DELETE /api/users",
]
def categorise(text):
t = text.lower()
for category, words in CATEGORIES.items():
if any(w in t for w in words):
return category
return "Uncategorised"
counts = {}
for f in findings:
cat = categorise(f)
counts[cat] = counts.get(cat, 0) + 1
for cat, n in sorted(counts.items(), key=lambda kv: (-kv[1], kv[0])):
print(f"{n} {'#' * n:<3} {cat}")2 ## A01 Broken Access Control
2 ## A03 Injection
1 # A02 Cryptographic Failures
1 # A05 Security Misconfiguration
1 # A06 Vulnerable Components
1 # A07 Auth Failures
1 # A10 SSRF
Two access-control and two injection findings out of nine is a typical picture: these are the categories to prioritise in training and code review.
A02 in practice: classifying stored data
"Cryptographic failures" usually start with not knowing which data is sensitive. A quick classification pass over a schema shows where encryption, hashing or deletion is needed:
RULES = [
("password", "hash with a slow KDF (never encrypt or store plain)"),
("card", "don't store; use a payment provider token"),
("iban", "encrypt at rest, restrict access"),
("national_id", "encrypt at rest, restrict access"),
("email", "personal data: protect and minimise"),
("birth", "personal data: protect and minimise"),
]
columns = ["id", "email", "password", "display_name", "card_number",
"iban", "date_of_birth", "created_at"]
for col in columns:
advice = next((a for key, a in RULES if key in col), "no special handling")
print(f"{col:<14} {advice}")id no special handling
email personal data: protect and minimise
password hash with a slow KDF (never encrypt or store plain)
display_name no special handling
card_number don't store; use a payment provider token
iban encrypt at rest, restrict access
date_of_birth personal data: protect and minimise
created_at no special handling
Using the Top 10 well
- As a checklist in code review: for each change, ask which categories it touches.
- As a training syllabus: every developer should be able to explain and prevent each category.
- As a starting point for testing: automated scanners (DAST), static analysis (SAST) and dependency scanners (SCA) each cover parts of it.
- Not as a compliance target: "we have no Top 10 issues" doesn't mean the application is secure.
Go further: The OWASP Top 10 2025 as a Map covers the current edition and classifies findings with CWE.
Test yourself
Which category is number one (A01) in the OWASP Top 10 2021?
- Injection
- Broken Access Control
- Cryptographic Failures
- SSRF
An application uses a library version with a published CVE. Which category is that?
- A04 Insecure Design
- A06 Vulnerable and Outdated Components
- A09 Logging Failures
- A03 Injection
Which OWASP project gives detailed, testable security requirements rather than an awareness list?
- The Top 10
- ASVS (Application Security Verification Standard)
- CVE
- CVSS