The OWASP Top 10.
OWASP is a global non-profit that publishes the most common and dangerous web application risks. Every web developer and security tester is expected to know this list. Today you'll understand each one with a simple example.
You don't need to memorise the numbers. You need to understand the ideas. In an interview, explaining one risk clearly beats listing ten names.
The list (OWASP Top 10, 2021 edition)
| # | Risk | In one line |
|---|---|---|
| A01 | Broken Access Control | Users can do or see things they shouldn't (like the IDOR from last lesson) |
| A02 | Cryptographic Failures | Sensitive data not encrypted, or weak encryption |
| A03 | Injection | User input is treated as a command (SQL injection, command injection) |
| A04 | Insecure Design | The feature itself is unsafe, even if coded "correctly" |
| A05 | Security Misconfiguration | Default passwords, open admin panels, detailed error messages |
| A06 | Vulnerable and Outdated Components | Using old libraries with known holes |
| A07 | Identification and Authentication Failures | Weak logins: no lockout, weak passwords, bad sessions |
| A08 | Software and Data Integrity Failures | Trusting updates or code that wasn't verified |
| A09 | Security Logging and Monitoring Failures | Attacks happen but nobody notices (Lesson 11!) |
| A10 | Server-Side Request Forgery (SSRF) | Tricking the server into fetching internal resources |
Deep dive 1: SQL injection
Databases are queried using a language called SQL. A login might check:
SELECT * FROM users WHERE roll = 'INPUT1' AND password = 'INPUT2';
If the code just glues user input into that sentence, an attacker can type special characters that change the meaning of the command, for example making the condition always true and logging in without a password.
The fix: never build SQL by gluing strings. Use parameterised queries (prepared statements), where input is always treated as data, never as part of the command.
It's like a waiter who reads out your order word-for-word to the kitchen, including "...and also give me the cash box". A good waiter (parameterised query) only passes the dish name, nothing more.
Deep dive 2: Cross-Site Scripting (XSS)
If a website shows user input on a page without cleaning it, an attacker can put JavaScript into, say, a comment. When other people view the page, that script runs in their browser, and can steal their session cookie (Lesson 13).
The fix: encode output (show <script> as text, never run it), validate input, use the HttpOnly cookie flag and a Content Security Policy.
Deep dive 3: Broken access control
The number one risk. Examples:
- Changing
/invoice?id=1045to1046shows someone else's invoice (IDOR). - A normal user opens
/adminjust by typing the URL, and it works. - A student changes
role=studenttorole=teacherin a request.
The fix: the server checks permissions on every request, for every object, and denies by default.
A comment box on a college blog shows comments exactly as typed, including HTML tags. Which risk is this most likely?
Unencoded user content shown to other users is the classic XSS setup.
A website still uses a 6-year-old version of a popular library with known vulnerabilities. Which category?
Old components with known holes are A06, and attackers scan for them automatically.
How companies find these problems
- Code review and secure coding training for developers.
- Automated scanners (SAST for code, DAST for running sites).
- Penetration tests: hired testers attack the app with permission.
- Bug bounty programmes: companies like Google, Meta and many Indian startups pay people who responsibly report vulnerabilities. Some Indian researchers have earned well this way, but only by following each programme's rules exactly.
What is the correct fix for SQL injection?
Parameterised queries separate commands from data. The other "fixes" don't work.
Your task (30 min, free)
Create a free account on PortSwigger Web Security Academy (portswigger.net/web-security). Read the first SQL injection topic and try the first "Apprentice" lab. It's a legal, safe place built for learning. If it feels hard, that's normal: come back after the Linux and HTTP lessons and try again.
Lesson 14 complete!
You know the OWASP Top 10 categories and can explain SQL injection, XSS and broken access control with examples. Next: cloud security basics.
Next: Cloud security basics →