Security OWASP WebSec

OWASP Top 10: Critical Web Application Security Risks

OH
Omar Hassan
Security Researcher
Dec 05, 2025
25 min read

What You'll Learn

The OWASP Top 10 lists the most critical security risks to web applications. Learn how SQL Injection, Broken Authentication, and XSS happen, and how to prevent them in your code.

What is OWASP?

The Open Worldwide Application Security Project (OWASP) is a nonprofit foundation dedicated to improving software security. Their "Top 10" report is the globally recognized standard for developers to ensure secure coding practices.

A01: Broken Access Control

Users acting outside of their intended permissions. For example, a user viewing someone else's account by changing the URL from /users/123 to /users/124 (known as Insecure Direct Object Reference or IDOR).

🛡️ Prevention: Always verify that the currently logged-in user actually owns or has permission to access the requested resource ID on the backend. Do not rely on hiding UI buttons.

A02: Cryptographic Failures

Failures related to cryptography, which often lead to sensitive data exposure (passwords, health records, credit cards). Examples include transmitting data over HTTP instead of HTTPS, or hashing passwords with MD5 instead of bcrypt/Argon2.

🛡️ Prevention: Enforce HTTPS everywhere (HSTS). Use up-to-date encryption algorithms. Never store passwords in plaintext — always salt and hash using modern algorithms.

A03: Injection (SQL, NoSQL, OS Command)

Occurs when untrusted user data is sent to an interpreter as part of a command or query. A hacker inputs ' OR 1=1 -- into a login field, tricking the database into logging them in.

// VULNERABLE: String concatenation
"SELECT * FROM users WHERE email = '" + req.body.email + "'";
🛡️ Prevention: Use Prepared Statements (Parameterized Queries) or an ORM. The database driver will automatically escape malicious characters.

A04: Insecure Design

A broad category representing flaws in architectural design and missing threat modeling. Perfect code cannot fix a fundamentally flawed authentication logic.

A05: Security Misconfiguration

Leaving default passwords (admin/admin), keeping debug features enabled in production, or exposing internal cloud ports to the public internet.

🛡️ Prevention: Implement automated hardening processes. Ensure cloud S3 buckets are private. Disable stack traces in production error messages.

The Rest of the Top 10

  • A06: Vulnerable and Outdated Components — Using an old version of Log4j or an unpatched npm package. Use tools like `npm audit` or Dependabot.
  • A07: Identification and Auth Failures — Weak password policies, no rate limiting on login (brute force), or session hijacking.
  • A08: Software and Data Integrity Failures — Pulling code from unverified sources, deserialization attacks, or compromised CI/CD pipelines.
  • A09: Security Logging and Monitoring Failures — Not logging failed logins or high-value transactions. Attackers can persist in systems for months without being noticed.
  • A10: Server-Side Request Forgery (SSRF) — Tricking the server into fetching a malicious URL or querying an internal cloud metadata API (like AWS 169.254.169.254).

Keep Reading

D
DevOps

Docker Networking Demystified: Bridge, Host & Overlay

8 min read Read More
C
Cloud

AWS IAM Roles vs Users vs Policies

10 min read Read More
P
Programming

Understanding Python's GIL & Multiprocessing

14 min read Read More