Cybersecurity for Developers
ConceptBeginner 20 min· Foundations · 2 of 13

The OWASP Top 10 explained

A plain-English tour of the OWASP Top 10:2025: what each risk means, a coffee-shop example, and the main defence, so you can spot these problems in your own code and answer interview questions.

The OWASP Top 10 is a short list of the most critical risks to web applications, published by the Open Worldwide Application Security Project (OWASP), a non-profit community. It is built from real vulnerability data and expert input, and it is updated every few years. It is the most common starting point for secure coding, audits and security interview questions.

This lesson walks through the current edition, OWASP Top 10:2025, with a plain-English meaning, a Brew & Bean example and the main defence for each item. The detailed fixes for the biggest ones have their own lessons in this track.

Know the edition

The list is an awareness document, not a complete checklist. Passing the Top 10 does not mean an app is secure. Use it to learn the big patterns, then go deeper. The 2021 edition is still widely quoted, so interviewers and older articles may use its names. We note the differences below.

The list at a glance

OWASP Top 10:2025

RankCategory (2025)One-line meaning
A01Broken Access ControlUsers can do or see things they should not be allowed to
A02Security MisconfigurationUnsafe settings, defaults or open services
A03Software Supply Chain FailuresRisk from dependencies, build tools and how software is delivered
A04Cryptographic FailuresSensitive data is not protected, or weak crypto is used
A05InjectionUntrusted input is run as code or commands (SQL, OS, XSS)
A06Insecure DesignThe design itself lacks the needed security controls
A07Authentication FailuresLogins, sessions and passwords can be abused
A08Software or Data Integrity FailuresCode or data is trusted without verifying it is genuine
A09Security Logging and Alerting FailuresAttacks happen and nobody notices
A10Mishandling of Exceptional ConditionsErrors and unexpected states are handled badly

If you know the 2021 list: Broken Access Control stayed at number one; Security Misconfiguration moved up; the old "Vulnerable and Outdated Components" grew into the wider Software Supply Chain Failures; Injection moved down; and Mishandling of Exceptional Conditions is a new category. Server-Side Request Forgery (SSRF), a separate item in 2021, is now folded into Broken Access Control. Check the official OWASP site for the exact wording.

A01 Broken Access Control

The app does not properly enforce what each user may do. Example: a logged-in customer changes /orders/41 to /orders/42 in the URL and sees someone else's order and phone number. Or an ordinary user calls the staff-only status endpoint.

Defence: deny by default; check permission on the server for every request; check that the user owns the object. The full tutorial is *Authorisation and broken access control*.

A02 Security Misconfiguration

Safe software with unsafe settings. Examples: debug mode left on in production, default admin passwords, a database open to the whole internet, a storage bucket that is public, missing security headers, detailed error pages that show stack traces.

Defence: a repeatable, minimal configuration; turn off what you do not use; separate settings for development and production; review settings in code review; scan configuration with tools (see *Security testing tools* in this track).

A03 Software Supply Chain Failures

Your app is mostly other people's code: npm and PyPI packages, base Docker images, build tools, CI services. If any link is compromised or outdated, your app is affected. Examples: an old library with a known bug; a malicious package with a name close to a real one; a build pipeline that anyone can change.

Defence: know your dependencies, update them, pin versions with a lockfile, scan them, and protect your build pipeline. See *Dependencies and supply-chain security*.

A04 Cryptographic Failures

Sensitive data is exposed because encryption is missing or wrong. Examples: sending data over plain HTTP, storing passwords with a fast hash like MD5, hard-coding an encryption key in the source, using your own invented algorithm.

Defence: HTTPS everywhere, a proper password hashing function, well-tested libraries, protect and rotate keys, and do not collect data you do not need. See *Cryptography basics*.

A05 Injection

The app builds a command or query by gluing in user input, so the input can change the meaning. Example: a search box that puts text straight into an SQL statement, so typing SQL syntax changes the query. Cross-site scripting (XSS), where user text becomes script in another user's browser, belongs here too.

Defence: keep data and commands separate with parameterised queries; encode output; validate input. See *Injection attacks: SQL, command and XSS*.

A06 Insecure Design

A flaw in the design, not in the code. A perfect implementation of a bad design is still insecure. Example: an order cancellation feature that refunds automatically with no limits, so a script could abuse it; or a password reset that asks for easily found information.

Defence: threat model early, write abuse cases ("how could someone misuse this?") alongside use cases, and add limits. See *The security mindset and threat modelling*.

A07 Authentication Failures

Weak proof of who a user is. Examples: allowing the password 123456, no protection against endless password guessing, sessions that never expire, login tokens that are easy to steal, no second factor for sensitive accounts.

Defence: strong password hashing, rate limiting, multi-factor authentication, secure session handling and not building your own login system when a trusted library or identity provider will do. See *Passwords, authentication and MFA done right*.

A08 Software or Data Integrity Failures

The app assumes code or data is genuine without checking. Examples: loading a script from a third-party site without verifying it; installing updates that are not signed; trusting serialised data from the client, such as a cookie that says role=admin with no signature; a CI pipeline that deploys unreviewed code.

Defence: verify signatures and checksums, sign data you hand to clients, use Subresource Integrity for scripts from a CDN, and review changes before they deploy.

A09 Security Logging and Alerting Failures

When something bad happens, you cannot see it or respond. Examples: failed logins are not logged; logs exist but nobody looks at them; no alert when 500 failed logins occur in a minute; logs that accidentally contain passwords.

Defence: log security events (logins, failures, permission denials, status changes) with time, user and source; keep logs safe; alert on unusual patterns; never log secrets or full card or password data.

A10 Mishandling of Exceptional Conditions

Programs fail in unexpected ways: bad input, a database timeout, a missing file, running out of memory. If these cases are handled badly, the app may crash, expose internal details, or fail open by allowing access when a check throws an error.

Defence: handle errors explicitly; fail closed (deny when unsure); return generic error messages to users and keep details in logs; test the unhappy paths.

Failing closed (sketch)
def is_allowed(user, order):
    try:
        return check_policy(user, order)
    except Exception:
        # Fail closed: if the check itself breaks, deny.
        return False

If check_policy crashes, access is denied. The opposite mistake, returning True in the except branch, would grant access exactly when something is broken.

Using the list in real work

How to use it

  1. 1Learn the names. Be able to explain each item in one sentence and give one example.
  2. 2Map your app to it. Walk through your own project and ask, for each item, "could this happen here?"
  3. 3Practise safely. Use an intentionally vulnerable app such as OWASP Juice Shop on your own machine. See *Practise legally: CTFs and labs*.
  4. 4Automate checks. Tools such as Semgrep, Trivy and ZAP find many of these issues. See *Security testing tools*.
  5. 5Go beyond the list. For APIs, the OWASP API Security Top 10 is a separate list. For AI features, see the OWASP Top 10 for LLM applications.

How this comes up in interviews

Typical questions: "Name five OWASP Top 10 risks." "What is broken access control and how do you prevent it?" "How do you prevent SQL injection?" Do not just recite the list. Pick two items you understand deeply, explain how the attack works at a high level, show the vulnerable pattern and the fix, and say how you would test for it. Mention that you know the list is updated, and which edition you studied.

Prompt · Quiz yourself on the list
Act as an interviewer for a junior developer role. Ask me one question at a time about the OWASP Top 10:2025 categories [list the ones you want to practise, e.g. A01, A05, A07]. After each of my answers, tell me what was good, what was missing, and give a better model answer in 3 or 4 sentences. Keep it defensive: no step-by-step attack instructions.

What to expect: Compare the model answers with the official OWASP pages. If the AI names categories that do not match the official list, trust the official site.

Try it: Map the Top 10 to your project

Take one of your projects. Make a table with the ten categories as rows. For each, write one sentence: where this could happen in your project and what you already do about it. Mark the three weakest rows.

Key takeaways

  1. The OWASP Top 10 is an awareness list of the most critical web application risks; the current edition is 2025.
  2. Broken Access Control is number one: always check permissions on the server.
  3. Misconfiguration, supply chain, crypto, injection, design, authentication, integrity, logging and error handling complete the list.
  4. Injection means untrusted input is interpreted as code; keep data separate from commands.
  5. Fail closed: when a security check breaks, deny access.
  6. Use the list to learn patterns, but it is not a full checklist for a secure app.

Check yourself

Finishing the quiz marks the lesson as done.

1. What is the main idea of Broken Access Control?

2. Which item covers risks from third-party packages, build tools and delivery pipelines?

3. An error occurs while checking permissions and the code returns True. What principle was ignored?

4. Why is the OWASP Top 10 not a complete security checklist?

5. A design allows unlimited free refunds with no checks. Which category fits best?

Saved on this device. Create a free account to keep it on every device.

Practise this with Sam

A real mock interview, out loud, with an honest scorecard. Free to start.

Start free