OWASP Top 10
The ten most critical web application security risks — what they are, how common they are, and how to prevent each one
Skills taught: websecurity.owasp, websecurity.risk-classification, websecurity.broken-access-control, websecurity.insecure-design
What is OWASP?
OWASP (Open Worldwide Application Security Project) is a non-profit foundation that publishes free security resources. Their most famous document is the OWASP Top 10 — a consensus list of the ten most critical security risks for web applications, updated every few years based on data from hundreds of organisations. It's not a law, but it's become the industry benchmark: compliance frameworks, security audits, and job interviews all reference it. Understanding the Top 10 gives you a mental map of the web security landscape.
OWASP Top 10 (2021 edition)
A01 — BROKEN ACCESS CONTROL (most common, was #5 in 2017)
Users can act outside their intended permissions
Example: change ?user_id=123 to ?user_id=456 and see another user's data
Prevention: deny by default, check permissions server-side, never trust client
A02 — CRYPTOGRAPHIC FAILURES (was 'Sensitive Data Exposure')
Weak encryption, plaintext transmission, weak hashing
Example: storing passwords as MD5 hashes; using HTTP not HTTPS
Prevention: TLS everywhere, bcrypt for passwords, AES-256 for data at rest
A03 — INJECTION (was #1 for many years)
SQL, NoSQL, OS command, LDAP injection — untrusted data as commands
Example: ' OR '1'='1 in a login form returning all users
Prevention: parameterized queries, input validation, escaping
A04 — INSECURE DESIGN
Missing security controls at design time, not just implementation bugs
Example: a password-reset flow that asks 'What city were you born in?'
Prevention: threat modelling, secure design patterns from the start
A05 — SECURITY MISCONFIGURATION (most common in practice)
Default passwords, unnecessary features enabled, overly permissive CORS
Example: debug mode enabled in production, pgAdmin exposed to internet
Prevention: hardened configs, infrastructure as code, regular audits
A06 — VULNERABLE AND OUTDATED COMPONENTS
Unpatched libraries, old frameworks, unsupported software
Example: Equifax breach (Apache Struts), Log4Shell (Log4j)
Prevention: Dependabot, npm audit, Software Composition Analysis (SCA)
A07 — IDENTIFICATION AND AUTHENTICATION FAILURES
Weak passwords, broken session management, missing MFA
Example: session tokens that never expire; no rate limiting on login
Prevention: strong password policies, MFA, secure session management
A08 — SOFTWARE AND DATA INTEGRITY FAILURES
Code and data not verified before use; insecure CI/CD pipelines
Example: auto-updating dependencies without verification (supply chain attack)
Prevention: code signing, pin dependency versions, review CI/CD permissions
A09 — SECURITY LOGGING AND MONITORING FAILURES
Not detecting, alerting, or responding to breaches
Example: an attacker exfiltrates data for 200 days before detection (average)
Prevention: log security events, alert on anomalies, have an incident plan
A10 — SERVER-SIDE REQUEST FORGERY (SSRF)
Server fetches a URL provided by the attacker, reaching internal services
Example: image upload feature fetches http://169.254.169.254/ (AWS metadata)
Prevention: validate and allowlist URLs, block internal IP ranges
Risk scoring — how OWASP ranks vulnerabilities
Risk = Likelihood × Impact
LIKELIHOOD factors:
- How easy is it to exploit? (SQL injection in a text box = easy)
- How common is it? (Broken access control = extremely common)
- How detectable is the attack? (SQL errors visible = easy to detect)
IMPACT factors:
- What data can be accessed? (all user records = high)
- What actions can be taken? (admin access = critical)
- Business impact (GDPR fine, reputation damage, legal liability)
CRITICAL: Broken access control to admin panel (high likelihood, high impact)
HIGH: SQL injection in a search box (medium likelihood, high impact)
MEDIUM: Missing CSRF token on a low-value form
LOW: Missing security header with no immediate exploit
Tip: A06 (Vulnerable Components) is the easiest win. Run npm audit in your project right now. If you have high or critical vulnerabilities, run npm audit fix. Enable Dependabot on GitHub (it's free) and it will open PRs when your dependencies have security patches. This one automation addresses A06 entirely and takes 5 minutes to set up. Most teams skip it and get breached by vulnerabilities that had patches available for months.
Frequently Asked Questions
Does passing OWASP Top 10 mean my app is secure?
No — it means you've addressed the most common vulnerabilities, which puts you ahead of most apps. The Top 10 is a minimum bar, not a complete security standard. It doesn't cover business logic flaws (which are app-specific), cryptographic implementation details, physical security, or many advanced attack techniques. After the Top 10, consider SOC 2, ISO 27001, or a penetration test for a more thorough assessment.