You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
The OWASP Top 10 is the most widely recognised document for web application security awareness. Published by the Open Web Application Security Project (OWASP), it represents a broad consensus about the most critical security risks to web applications.
OWASP is a nonprofit foundation dedicated to improving the security of software. It provides:
The OWASP Top 10 is updated periodically based on data collected from hundreds of organisations and analysis of real-world vulnerabilities.
| Rank | Category | Description |
|---|---|---|
| A01 | Broken Access Control | Users act outside their intended permissions |
| A02 | Cryptographic Failures | Failures related to cryptography that expose sensitive data |
| A03 | Injection | Hostile data sent to an interpreter as part of a command or query |
| A04 | Insecure Design | Missing or ineffective security controls in the design phase |
| A05 | Security Misconfiguration | Insecure default configurations, incomplete setups, open cloud storage |
| A06 | Vulnerable and Outdated Components | Using components with known vulnerabilities |
| A07 | Identification and Authentication Failures | Weaknesses in authentication and session management |
| A08 | Software and Data Integrity Failures | Code and infrastructure that does not protect against integrity violations |
| A09 | Security Logging and Monitoring Failures | Insufficient logging, detection, and response |
| A10 | Server-Side Request Forgery (SSRF) | Web application fetches a remote resource without validating the URL |
Broken Access Control moved from fifth place to the number one spot in 2021. It occurs when users can act outside their intended permissions:
Example — Insecure Direct Object Reference:
# Attacker changes the account ID in the URL
GET /api/accounts/12345/transactions
# to
GET /api/accounts/67890/transactions
If the server does not verify that the authenticated user owns account 67890, the attacker can view someone else's transactions.
Prevention:
Previously called "Sensitive Data Exposure," this category focuses on failures related to cryptography:
Prevention:
Injection flaws occur when untrusted data is sent to an interpreter as part of a command or query. SQL injection remains the most common, but NoSQL, OS command, and LDAP injection are also prevalent.
Example — SQL Injection:
-- User input: ' OR '1'='1' --
SELECT * FROM users WHERE username = '' OR '1'='1' --' AND password = 'anything'
-- This returns all users because '1'='1' is always true
Prevention:
This is a new category in 2021 that focuses on risks related to design and architectural flaws. Unlike implementation bugs, insecure design cannot be fixed by a perfect implementation — the design itself is flawed.
Examples:
Prevention:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.