Common Vulnerabilities & OWASP Top 10
The OWASP Top 10 is the definitive security awareness document for web applications. Updated every 3–4 years, it ranks the 10 most critical web application security risks along with prevalence data, exploitability, and impact. Understanding these categories helps you recognize, prevent, and fix vulnerabilities before attackers exploit them.
Important
OWASP Top 10 2021: Complete Analysis
Each category includes exploitation technique, real-world incident analysis, detection methods, and comprehensive prevention strategies. These aren\u2019t academic exercises—these flaws appear in production systems daily.
Broken Access Control
Restrictions on what authenticated users can do are not enforced properly. Attackers can gain unauthorized access to other users’ accounts, files, or data.
Vulnerability Mechanism:
User can modify URL or request parameters to access data they shouldn’t. Missing verification of user permissions on server-side.
Prevention Checklist:
- Enforce access control on every request, never trust client-side checks
- Deny by default unless explicitly allowed
- Implement least privilege—users get only required permissions
- Use framework access control mechanisms (Spring Security, ASP.NET Authorization) rather than custom code
- Log and monitor access control failures
Real-World Breaches Using This Vulnerability:
Facebook/Instagram (2018): Privacy bug allowed changing any video's privacy settings via access control flaw in GraphQL API permitting unauthorized access to private videos.
Twitter (2020): Privilege escalation vulnerability allowed any user to turn on “Protect your tweets” setting for any account via API bug.
How to Test for This Vulnerability:
Attempt parameter tampering (user_id, account_id). Test horizontal (same privilege) and vertical (elevated privilege) access. Check if you can access files outside your directory.
Cryptographic Failures
Sensitive data exposed due to weak or missing encryption in transit or at rest. Previously called “Sensitive Data Exposure”.
Vulnerability Mechanism:
Data transmitted in plain HTTP, stored with weak encryption or no encryption, or keys hardcoded in source code.
Prevention Checklist:
- Encrypt all data in transit (TLS 1.3 everywhere, HSTS), at rest (AES-256 full-disk or database encryption)
- Never store sensitive data you don’t need (PCI-DSS: don’t store CVV, SSN only if absolutely necessary)
- Use strong, up-to-date algorithms (AES-256, RSA-3072+, SHA-256+)
- Protect encryption keys in secure storage (HSM, cloud KMS, not source code)
- Disable caching of sensitive pages
Real-World Breaches Using This Vulnerability:
Equifax (2017): Unencrypted personal data (SSNs, DOB) of 147 million people exposed due to unpatched Struts vulnerability and lack of encryption at rest.
T-Mobile (2021): API didn’t require authentication for account lookup, exposing names, addresses, phone numbers, and partial SSNs of 50M customers.
How to Test for This Vulnerability:
Intercept traffic with Burp Suite—is everything HTTPS? Check database encryption at rest. Search source code for hardcoded keys.
Injection Flaws
Untrusted data sent to interpreter as part of command or query. Original type (SQL, NoSQL, OS, LDAP) but all share same core issue: data and code not separated.
Vulnerability Mechanism:
User input concatenated directly into SQL query, shell command, or LDAP filter. Attacker provides crafted input that changes query meaning.
Prevention Checklist:
- Use parameterized queries (prepared statements) for all database access—never string concatenation
- Stored procedures with bind variables (not dynamic SQL)
- ORM frameworks (Hibernate, Entity Framework) protect against SQLi
- Input validation (deny lists for dangerous characters, but not primary defense)
- Least privilege DB accounts—application user shouldn’t have DROP permission
- ESC (Exploit Sanitization Columns) or RASP (Runtime Application Self-Protection)
Real-World Breaches Using This Vulnerability:
Sony Pictures (2011): SQL injection in web application gave attackers initial foothold, leading to network breach, data theft (emails, unreleased films), and system wipe.
PBS (2011): SQL injection in WordPress site allowed attackers to steal 52,000+ user credentials and deface main website.
How to Test for This Vulnerability:
Enter single quote (“)” in input field. Look for error messages. Use sqlmap automated tool. Check for odd behavior.
Insecure Design
Flaws in architecture and design, not implementation. Missing or ineffective control design. Business logic flaws.
Vulnerability Mechanism:
System lacks fundamental security controls from design phase. No threat modeling. Requirements don’t include security.
Prevention Checklist:
- Threat modeling during design phase (STRIDE, PASTA)
- Secure design patterns and principles (defense in depth, least privilege, fail secure)
- Security requirements in user stories (“As a user, I want my password encrypted”)
- Architecture reviews with security focus
- Secure coding standards and peer design reviews
Real-World Breaches Using This Vulnerability:
Log4Shell (2021): Design decision to allow remote code execution via JNDI lookups in logging statements created global crisis. Apache designed feature without security consideration.
Bridewell Hotel Booking (2020): Business logic flaw allowed negative prices. Negative price applied as credit during booking—users received free rooms with negative balance (hotel owed money).
How to Test for This Vulnerability:
Review architecture for missing controls. Check for business logic bypass (discount codes, workflow circumvention).
Security Misconfiguration
Insecure default configurations, open cloud storage, verbose error messages revealing secrets, unnecessary services enabled.
Vulnerability Mechanism:
Dev or test configurations deployed to production. Default passwords unchanged. Debug mode enabled. Directory listing allowed.
Prevention Checklist:
- Immutable infrastructure (images pre-hardened, not configured post-deploy)
- Automated configuration scanning (CIS Benchmarks, cloud security posture tools)
- Remove/replace default accounts and passwords
- Disable directory listing, verbose error messages in production
- Infrastructure as Code (IaC) with security baked into templates (Terraform, CloudFormation)
- Regular automated scanning (Qualys, Nessus) and compliance audits
Real-World Breaches Using This Vulnerability:
Capital One (2019): Misconfigured AWS WAF rule allowed SSRF, leading to 100M+ records stolen from S3. Combined with excessive IAM permissions.
Microsoft Power Apps (2022): Default OData filter not enabled, exposing 38M records across 2,000+ organizations including vaccination records, COVID test results.
How to Test for This Vulnerability:
Check default credentials. Attempt to access /admin, /backup directories. Review cloud storage permissions. Check HTTP headers revealing server versions.
Vulnerable & Outdated Components
Using components with known vulnerabilities (libraries, frameworks, OS, containers). “Log4Shell” made this top of mind.
Vulnerability Mechanism:
Application includes outdated dependency (Log4j 2.x, older jQuery with XSS, unpatched OS). Attackers exploit public CVE.
Prevention Checklist:
- Software Composition Analysis (SCA) tools: Snyk, Dependabot, OWASP Dependency-Check
- Monitoring CVE feeds (NVD, vendor advisories) for dependencies
- Remove unused dependencies—smaller attack surface
- Regular patch cycles—security updates applied within SLA (typically 30 days for critical)
- Virtual patching (WAF rule) when immediate patch unavailable
- SBOM (Software Bill of Materials) inventory—know exactly what's in your software
Real-World Breaches Using This Vulnerability:
Log4Shell (2021): vulnerability in ubiquitous Apache Log4j logging library. Affected millions of Java applications globally (Minecraft servers, Amazon, Apple, Tesla, etc.). Required mass patching across all Java applications.
SolarWinds (2020): Compromised build system inserted backdoor into signed Orion software update. Third-party software supply chain attack affected 18,000+ organizations.
How to Test for This Vulnerability:
Use OWASP Dependency-Check, npm audit, bundler-audit. Check versions against NVD for known CVEs.
Identification & Authentication Failures
Weak password policies, credential stuffing, insecure password recovery, session fixation. Previously “Broken Authentication” split into this and Access Control.
Vulnerability Mechanism:
Weak password policy (123456 allowed), no rate limiting on login, predictable session tokens, credential stuffing attacks succeed.
Prevention Checklist:
- MFA mandatory—blocks 99.9% of automated credential attacks
- Rate limiting / account lockout after N failed attempts (with care to avoid DoS)
- Check passwords against HaveIBeenPwned API when setting new password
- Secure session management: regenerate ID on login, HttpOnly cookies, short timeout
- Enforce password policy: 8+ chars, complexity, no common passwords
- CAPTCHAs to slow down automated attacks
Real-World Breaches Using This Vulnerability:
Collection #1 (2019): 21 billion unique email:password pairs posted online. Enabled massive credential stuffing attacks across dozens of sites.
Twitter (2020): Social engineering of employees bypassed MFA, but initial entry was via leaked credentials used to access VPN.
How to Test for This Vulnerability:
Attempt weak passwords. Try SQLi in login. Check if session ID changes after login (fixation). Attempt to reuse session token from another browser.
Software & Data Integrity Failures
Code and infrastructure integrity violations: unsigned code, untrusted CI/CD pipelines, insecure deserialization. Related to Supply Chain attacks.
Vulnerability Mechanism:
Attacker modifies code or dependencies in transit or at rest. No integrity checks. Deserialization of untrusted data executes code.
Prevention Checklist:
- Code signing with hardware security modules (HSM)—private key never leaves hardware
- Reproducible builds—verify binary matches source
- SBOM (Software Bill of Materials) for transparency
- Verify digital signatures of all dependencies and updates
- Secure CI/CD pipelines (isolated runners, signed commits, PR approval)
- Never deserialize untrusted data (use JSON, not binary serialization)
Real-World Breaches Using This Vulnerability:
SolarWinds (2020): Supply chain compromise of Orion updates. Attackers inserted backdoor into legitimate signed update distributed to 18,000+ customers.
CodeCov (2021): Bash script uploader modified to steal AWS credentials from CI environment, affecting hundreds of companies.
How to Test for This Vulnerability:
Verify all updates signed. Check CI/CD pipeline permissions. Audit dependencies for unsigned packages. Look for serialization libraries in code.
Security Logging & Monitoring Failures
Insufficient logging, monitoring, or alerting. Cannot detect breaches in progress. Audit logs incomplete or tamperable.
Vulnerability Mechanism:
No logging of authentication attempts. Logs not centralized. No alerts for suspicious activity. Logs stored locally (attacker deletes).
Prevention Checklist:
- Centralized logging (SIEM: Splunk, Elasticsearch, Sentinel)
- Log all authentication attempts (success/failure), access control failures, input validation failures
- Audit trail includes sufficient context: user, timestamp, IP, user agent, action, resource
- Real-time alerts and monitoring for critical events (multiple failed logins, privilege escalation)
- Integrate with SOAR for automated response
- Protect logs from tampering (write-once storage, centralized collection)
Real-World Breaches Using This Vulnerability:
Colonial Pipeline (2021): Attackers used compromised VPN password. No MFA, poor monitoring. Ransomware deployed before detection. 5-day fuel shortage across US East Coast.
Target (2013): Attackers in network for 3 weeks before detection. Firewall alerts ignored, monitoring tools failed to correlate events.
How to Test for This Vulnerability:
Can you see failed login attempts in logs? Are logs encrypted and protected? What triggers alert?
Server-Side Request Forgery (SSRF)
Attacker tricks server into making requests to internal resources or external systems it can access. Can lead to cloud metadata theft, internal network scanning.
Vulnerability Mechanism:
Web app fetches URL provided by user (for screenshot, import, metadata). Attacker provides internal IP (169.254.169.254 AWS metadata). Server fetches internal resource, returns to attacker.
Prevention Checklist:
- Network segmentation: application servers shouldn’t access sensitive services (metadata, internal APIs)
- URL allowlisting for outbound requests
- Disable HTTP redirections in server-side requests
- Validate and sanitize all user-provided URLs
- Cloud metadata service access only via IAM policies, not from application instances
Real-World Breaches Using This Vulnerability:
Capital One (2019): SSRF flaw in WAF allowed attacker to query AWS EC2 metadata service, stealing temporary IAM credentials, accessing 100M+ customer records in S3.
Microsoft Power Apps (2022): Misconfiguration allowed SSRF attacks against internal services, exposing 38M+ records.
How to Test for This Vulnerability:
Pass internal IPs (127.0.0.1, 10.0.0.1, 169.254.169.254) to URL parameters. See if server fetches internal resource.
Understanding OWASP Risk Assessment
OWASP Top 10 ranks risks based on likelihood (how often flaw exists, how easy to exploit) and impact (technical and business consequences).
Likelihood Factors
Ease of Detection
How easily can attacker find the vulnerability? (Tool-assisted? Manual?)
Ease of Exploit
Technical skill required? Public exploit available? Automated tools?
Awareness
Is vulnerability well-known (CVE) or obscure?
Detection
Can defenders detect the exploit in logs/IDS?
Impact Factors
Confidentiality
What data is exposed? PII, trade secrets, credentials?
Integrity
Can attacker modify or destroy data? Financial fraud potential?
Availability
Does exploit cause downtime? Ransomware potential?
Scope
Single user vs. all users? Single system vs. entire organization?
Defense-in-Depth Against OWASP Vulnerabilities
No single control prevents all OWASP categories. Layer defenses from development through deployment.
Requirements & Design
Threat modeling (STRIDE) identifies OWASP risks early
Security requirements (authentication, encryption, logging) in user stories
Secure design patterns (input validation layer, centralized auth)
Privacy by design principles
Development
Secure coding standards (avoid string concatenation SQL, use parameterized queries)
Security code reviews (peer review + automated SAST)
Input validation and output encoding everywhere
Password hashing with bcrypt/Argon2 (phc-winner-argon2)
Testing
Dynamic Application Security Testing (DAST) – Burp Suite, OWASP ZAP
Static Application Security Testing (SAST) – SonarQube, CodeQL
Penetration testing annually or on major changes
Dependency scanning (Snyk, Dependabot) for vulnerable components
Deployment & Operations
Web Application Firewall (WAF) blocks known attacks in production
Runtime Application Self-Protection (RASP) embeds security in app runtime
Security monitoring (SIEM) alerts on attack patterns
Regular vulnerability scanning and penetration testing
OWASP Resources & Further Study
OWASP provides free, vendor-neutral resources for secure development. These are industry standard references.
Official Top 10 document with detailed risk ratings, examples, and testing guidance for each category.
Practical guides for authentication, SQLi prevention, XSS protection, session management, and dozens of other topics.
Comprehensive manual for penetration testers. Step-by-step testing procedures for all OWASP categories.
Free, open-source DAST tool that automatically finds OWASP Top 10 vulnerabilities in running applications.
Intentionally vulnerable modern web app for hands-on OWASP Top 10 practice. CTF-style challenges with hints.
SCA tool that scans project dependencies (Maven, NPM, NuGet) against NVD for known vulnerabilities.
OWASP Top 10 in This Curriculum
OWASP vulnerabilities appear throughout your learning journey. Build layered understanding across modules.
Web Application Security Deep Dive (Module 10)
- Detailed SQL injection payloads, blind SQLi, time-based attacks
- XSS: stored, reflected, DOM-based, CSP bypasses
- CSRF token bypass, CORS misconfiguration
- Secure coding practices and code review techniques
Penetration Testing Methodologies (Module 9)
- Manual OWASP testing methodology (4-phase: recon, mapping, discovery, exploitation)
- Burp Suite professional for OWASP scanning
- Custom exploit development for business logic flaws
- Reporting findings with OWASP risk rating
Cryptography & Access Control (Modules 3 & 4)
- Broken Crypto leads to data exposure (Category 2)
- Weak session management = authentication failures (Category 7)
- Failed access control lets attackers bypass auth (Category 1)
- Cryptographic failures underlie many OWASP issues
DevSecOps Secure SDLC (Module 18)
- SAST catches Category 1–10 during development
- DAST catches runtime Category 1,3,5 in app
- Software composition analysis blocks Category 6 (vulnerable components)
- CI/CD gates prevent vulnerable code deployment
Key Takeaways
- OWASP Top 10 is the industry standard for web app risks. Every developer and pentester must know all 10 categories.
- Broken Access Control (#1) is most common and highest-impact vulnerability. Enforce authorization on every request.
- Injection (SQLi, OS Command, LDAP) prevented by parameterized queries, never string concatenation with user input.
- Cryptographic Failures mean data exposed in transit/at rest. TLS everywhere, encrypt sensitive data at rest, never hardcode keys.
- Vulnerable Components (#6) remediate with SCA tools. Log4j-style supply chain attacks require robust dependency management.
- SSRF (#10) rising with cloud adoption. Prevent with network segmentation, metadata service protection.
- Defense-in-depth: WAF (block known patterns), secure coding (prevent), SAST/DAST (detect), monitoring (respond).
Further Reading & Resources
Complete OWASP Top 10 with detailed risk ratings, example flaws, testing guidance for each category.
900+ pages of comprehensive penetration testing procedures for every OWASP category with step-by-step instructions.
Industry-standard web app security testing platform used by 70%+ of professional pentesters. Includes scanner, proxy, intruder, repeater.
MITRE's Common Weakness Enumeration catalog with detailed descriptions, examples, and mitigations for each weakness.