The OWASP Top 10 is the most widely referenced standard for web application security risks. Updated for 2026, it reflects the current threat landscape facing modern web applications — from classic injection vulnerabilities to broken access control and security misconfigurations that continue to dominate real-world breaches.
This guide uses DVWA (Damn Vulnerable Web Application) as the hands-on practice target. Every category includes a technical explanation, how to identify it, a DVWA lab exercise, and the defensive countermeasure. All testing is performed in an isolated local environment — never test against real applications without explicit written authorization.
◈ Table of Contents
01 — DVWA LAB SETUP
PREREQUISITEDVWA (Damn Vulnerable Web Application) is an intentionally vulnerable PHP/MySQL web app. The fastest way to run it is via Docker. Run it only on your local machine or an isolated VM — never expose it to the internet.
DVWA is intentionally vulnerable. Run it only in Docker on localhost or in an isolated VM with no internet exposure. Never deploy DVWA on a production server, public IP, or any network you don't fully control.
A01 — BROKEN ACCESS CONTROL
#1 MOST COMMON RISKBroken Access Control is the top OWASP risk — occurring when users can act outside their intended permissions. Common forms include IDOR (Insecure Direct Object Reference), where changing a parameter accesses another user's data, and forced browsing to admin pages.
- [!] IDOR:
GET /api/orders/1234→ change to/api/orders/1235to see another user's order - [!] Forced browsing: accessing
/admin,/admin/userswithout authentication check - [!] Privilege escalation: changing
role=usertorole=adminin a cookie or parameter - [!] Path traversal:
../../../etc/passwdto read files outside the web root
A02 — CRYPTOGRAPHIC FAILURES
DATA EXPOSURE RISKCryptographic Failures (formerly "Sensitive Data Exposure") cover cases where data is inadequately protected in transit or at rest. The most common forms are passwords stored as weak hashes (MD5, SHA1), sensitive data transmitted over HTTP, and weak TLS configurations.
| Failure Type | Example | Fix |
|---|---|---|
| Weak password hashing | MD5 or SHA1 without salt | bcrypt, Argon2id, scrypt with cost factor ≥12 |
| Hardcoded secrets | API keys in source code | Environment variables, secrets manager (AWS SSM, Vault) |
| Cleartext transmission | HTTP login forms | HTTPS everywhere, HSTS header |
| Weak TLS | TLS 1.0/1.1, RC4, MD5 cipher | TLS 1.2+ only, disable weak cipher suites |
| Unencrypted database | Passwords visible in DB | Encrypt sensitive columns, full-disk encryption |
A03 — INJECTION
CLASSIC & CRITICALInjection occurs when untrusted data is sent to an interpreter as part of a command or query. SQL injection, OS command injection, LDAP injection, and XSS are all forms of injection. SQL injection remains one of the highest-impact web vulnerabilities, enabling attackers to read, modify, or delete database contents.
- 1Navigate to DVWA → SQL Injection module → Security: Low
- 2The form asks for a User ID — enter
1and submit. Note it returns user "admin" - 3Test for SQLi by entering a single quote:
'— the page shows a MySQL error, confirming SQLi - 4Determine column count: try
1 ORDER BY 1--,1 ORDER BY 2--,1 ORDER BY 3--— error on 3 means 2 columns - 5UNION-based extraction:
1' UNION SELECT user(), database()--— returns current DB user and database name - 6Dump tables:
1' UNION SELECT table_name, NULL FROM information_schema.tables WHERE table_schema=database()-- - 7Dump users:
1' UNION SELECT user, password FROM users--
The fix for SQL injection is parameterised queries (prepared statements) — not input filtering. Filtering can be bypassed; parameterised queries make injection structurally impossible. In PHP: use PDO with bound parameters. In Python: use cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,)).
XSS is a form of injection where malicious scripts are injected into web pages viewed by other users. It enables session hijacking, credential theft, keylogging, and phishing within the victim's browser context. Three types: Reflected, Stored, DOM-based.
A05 — SECURITY MISCONFIGURATION
EXTREMELY COMMONSecurity misconfigurations are the most common finding in web application assessments. They include default credentials left unchanged, debug modes enabled in production, directory listing exposed, verbose error messages, and unnecessary features or services enabled.
| Misconfiguration | Impact | How to Test |
|---|---|---|
| Default admin credentials | Full application takeover | Try admin/admin, admin/password, admin/1234 |
| Directory listing enabled | Source code, config file disclosure | Navigate to /images/, /uploads/, /backup/ |
| Debug mode in production | Stack traces reveal code, DB structure | Force a 500 error; check if stack trace appears |
| Verbose HTTP headers | Tech stack fingerprinting | curl -I target.com — check Server, X-Powered-By headers |
| CORS wildcard | Cross-origin data theft | Access-Control-Allow-Origin: * on API responses |
A07 — IDENTIFICATION & AUTHENTICATION FAILURES
AUTH ATTACKSAuthentication failures include brute force attacks with no rate limiting, credential stuffing (using breached passwords against other sites), weak session management, and broken "remember me" functionality. DVWA's Brute Force module demonstrates this directly.
- [+] Rate limit login attempts — lockout after 5 failures (use exponential backoff)
- [+] Require MFA for all privileged accounts
- [+] Implement CAPTCHA after repeated failures
- [+] Invalidate sessions on logout server-side
- [+] Use secure, HttpOnly, SameSite=Strict cookie flags
- [+] Check passwords against known breached credentials (HaveIBeenPwned API)
A10 — SERVER-SIDE REQUEST FORGERY (SSRF)
CRITICAL IN CLOUDSSRF allows attackers to make the server issue HTTP requests to internal services, cloud metadata APIs, or other hosts the attacker cannot directly reach. In cloud environments, SSRF is critical — it often leads to IAM credential theft via the metadata service at 169.254.169.254.
AWS IMDSv2 requires a PUT request to get a token first, then uses the token in the metadata request — this breaks most SSRF chains. If your AWS environment still allows IMDSv1, it's a critical finding: enforce IMDSv2 via instance metadata options in your EC2 launch configuration or Terraform aws_instance resource.
| Rank | Category | Key Attack Type |
|---|---|---|
| A01 | Broken Access Control | IDOR, forced browsing, privilege escalation |
| A02 | Cryptographic Failures | Weak hashing, cleartext, weak TLS |
| A03 | Injection | SQLi, XSS, Command injection, LDAP injection |
| A04 | Insecure Design | Missing security requirements, threat modeling gaps |
| A05 | Security Misconfiguration | Default creds, debug mode, verbose errors, open cloud buckets |
| A06 | Vulnerable & Outdated Components | Known CVEs in libraries, frameworks, CMS plugins |
| A07 | Identification & Auth Failures | Brute force, credential stuffing, weak session management |
| A08 | Software & Data Integrity Failures | Insecure deserialization, unsigned updates, CI/CD poisoning |
| A09 | Security Logging & Monitoring Failures | No audit logs, no alerting, undetected breaches |
| A10 | Server-Side Request Forgery (SSRF) | Internal service access, cloud metadata theft |
All techniques in this guide are for authorized testing in controlled lab environments only. Apply these methods against DVWA or other intentionally vulnerable apps you own. Testing against production applications or systems without explicit written authorization is illegal under the Computer Misuse Act, CFAA, and equivalent laws worldwide.
◈ Stay Connected
Follow CyberHawk Threat Intel for web application security tutorials, penetration testing labs, and professional SOC training.
"They can't exploit you if you are the Exploit."