Trusteed Academy
OWASP Top 10 for Web Applications
The OWASP Top 10 (2021) for web applications — vulnerable patterns, secure patterns, copy-paste rules for Cursor, Claude Code, and Codex, and verification checklists.
URL: trusteed.io/academy/web-security/
The OWASP Top 10 is the industry-standard classification of the most critical security risks in web applications, maintained by the OWASP Foundation and revised periodically based on real-world vulnerability data. The 2021 edition is the current version. This series gives you a standalone, practical guide to each of the ten categories — a vulnerable code pattern, a secure pattern, and a ready-to-paste rules block for Cursor, Claude Code, and Codex, so your AI coding assistant stops reproducing these patterns instead of catching them after the fact.
This is the web application counterpart to Trusteed Academy's API Security Top 10 series, which covers the OWASP API Security Top 10 — a related but distinct list focused specifically on API design. Several categories overlap conceptually (access control, authentication, misconfiguration, SSRF); where they do, each guide links to its counterpart so you can go deeper on the API-specific or web-specific angle as needed.
The 10 Categories
| # | Category | What It Covers |
|---|---|---|
| A01:2021 | Broken Access Control | Users acting outside their intended permissions |
| A02:2021 | Cryptographic Failures | Sensitive data exposed due to weak or missing encryption |
| A03:2021 | Injection | Untrusted data interpreted as commands or queries (SQLi, XSS, and more) |
| A04:2021 | Insecure Design | Missing security controls at the architecture and design stage |
| A05:2021 | Security Misconfiguration | Insecure defaults, unnecessary features, and hardening gaps |
| A06:2021 | Vulnerable and Outdated Components | Using libraries and frameworks with known vulnerabilities |
| A07:2021 | Identification and Authentication Failures | Session and identity management weaknesses |
| A08:2021 | Software and Data Integrity Failures | Trusting code, updates, or data without verifying integrity |
| A09:2021 | Security Logging and Monitoring Failures | Attacks that go undetected because nothing was watching |
| A10:2021 | Server-Side Request Forgery (SSRF) | Servers tricked into fetching attacker-controlled resources |
Why This Series Exists
The OWASP Top 10 predates the current wave of AI-assisted development, but the vulnerability classes it describes are exactly the ones AI coding assistants reproduce most reliably — not because the models are careless, but because functional, working code and secure code are different targets, and most training data optimizes for the first one. A tutorial demonstrating string concatenation into a SQL query is teaching SQL, not secure coding; an assistant trained partly on that pattern will complete a database query the same way unless instructed otherwise.
Each guide in this series gives you that instruction, in the exact format Cursor, Claude Code, and Codex read.
How to Use These Guides
- Identify which categories apply to what you're building — nearly every application needs to address Broken Access Control, Injection, Cryptographic Failures, and Security Misconfiguration at minimum.
- Copy the rules block from each relevant guide into your project's
.cursor/rules/,CLAUDE.md, orAGENTS.md. - Use the verification checklist during code review, or wire equivalent checks into CI.
- Validate continuously in a running environment, not just at code-review time — see Trusteed's vulnerability scanner for continuous DAST and dependency scanning, and Trusteed's WAAP platform for runtime protection and testing that covers these categories in production.
Frequently Asked Questions
How does the OWASP Top 10 differ from the OWASP API Security Top 10? The OWASP Top 10 (this series) covers general web application security risks — applicable to any web app regardless of whether it exposes a formal API. The OWASP API Security Top 10 is a separate, API-specific list addressing risks unique to API design, like object- and function-level authorization at the endpoint level. Modern applications typically need both.
Is the 2021 edition still current? Yes, as of this writing the 2021 edition is OWASP's current published Top 10 for web applications. OWASP revises the list periodically based on aggregated vulnerability data from contributing organizations, and updates typically span several years between major revisions.
Do all 10 categories apply to every web application? Broken Access Control, Injection, Cryptographic Failures, Security Misconfiguration, and Vulnerable Components are relevant to nearly every application with any meaningful attack surface. Insecure Design and Software/Data Integrity Failures become more relevant as an application's business logic and deployment pipeline grow in complexity.
Can following these guides alone make an application secure? These guides address the most common and highest-impact vulnerability classes, but security is a continuous practice, not a one-time checklist. Pair rules-based prevention during development with continuous scanning and testing in staging and production — static rules can't catch runtime misconfigurations, newly disclosed dependency vulnerabilities, or logic flaws that only appear under real usage.
This series is part of Trusteed Academy. See also the API Security Top 10 series and the Security Glossary.