OWASP Top 10

The Ten Most Critical Web Application Security Risks (2021)

A01

Broken Access Control

Users can act outside their intended permissions. Access control fails when: users can view/modify unauthorized data, change access rights, view/use functions they shouldn't access.

Common Issues
Testing Methods
Prevention
A02

Cryptographic Failures

Exposure of sensitive data due to failures in using or implementing cryptography. Includes inadequate encryption, exposed keys, weak algorithms, and side-channel attacks.

Common Issues
Testing Methods
Prevention
A03

Injection

Occurs when untrusted data is sent as a command or query. Attacker-controlled data can trick the interpreter into executing unintended commands.

Common Types
-- SQL Injection Example
SELECT * FROM users WHERE username='admin' OR '1'='1';

-- Command Injection Example
ping example.com; ls -la
Testing Methods
Prevention
A04

Insecure Design

A new category for risks related to design flaws. Missing security controls that should have been implemented during the design phase.

Common Issues
Testing Methods
Prevention
A05

Security Misconfiguration

Insecure default configurations, imcomplete or ad-hoc setups, open cloud storage, misconfigured HTTP headers, or outdated software.

Common Issues
-- Missing Security Headers
HTTP/1.1 200 OK
(Missing: X-Frame-Options, CSP, HSTS, etc.)
Testing Methods
Prevention
A06

Vulnerable and Outdated Components

Using libraries, frameworks, software, and other components with known vulnerabilities. No tracking of component versions or timely updates.

Common Issues
Testing Methods
Prevention
A07

Identification and Authentication Failures

Failures in confirming user identity, authentication, and session management. Allows attackers to assume user or admin identities.

Common Issues
Testing Methods
Prevention
A08

Software and Data Integrity Failures

Failures in software updates, critical data changes, and CI/CD pipeline integrity. Assumes integrity of plugins, libraries, and updates.

Common Issues
Testing Methods
Prevention
A09

Logging and Monitoring Failures

Insufficient logging, detection, monitoring, and alerting of security events. Allows attack detection to be bypassed.

Common Issues
Testing Methods
Prevention
A10

Server-Side Request Forgery (SSRF)

Allows attackers to coerce server-side application to make requests to unintended locations. Can be used to access internal systems or perform unauthorized actions.

Common Issues
POST /api/download?url=http://internal-server/admin
POST /webhook?url=http://localhost:8000/secrets
Testing Methods
Prevention