OWASP Top 10 (2025) Explained with Examples
December 5, 2026 · 11 min read

The OWASP Top 10 is the best-known list of the most critical security risks to web applications, published by the Open Worldwide Application Security Project. Developers, testers, auditors and buyers use it as a shared starting point: if your application handles the ten risks well, you have dealt with the problems attackers exploit most often. It is an awareness document, not a complete standard, but it is the first thing many security reviews and contracts ask about.
The latest edition, the OWASP Top 10:2025, was presented as a release candidate at OWASP's Global AppSec USA conference in November 2025 and finalised in early 2026. As The Register reported, broken access control is still number one, security misconfiguration has climbed to second and software supply chain failures entered the list. This guide explains all ten risks in plain English, with real examples, runnable code and practical fixes.
The OWASP Top 10:2025 at a Glance
| Rank | Risk | Change since 2021 | Typical example |
|---|---|---|---|
| A01 | Broken Access Control | Still first; now includes SSRF | Changing an ID in the URL shows another customer's invoice |
| A02 | Security Misconfiguration | Up from fifth | Default admin password, open storage bucket, verbose errors |
| A03 | Software Supply Chain Failures | New; expands vulnerable components | A compromised npm package steals tokens on install |
| A04 | Cryptographic Failures | Down from second | Passwords stored with fast hashes, missing HTTPS |
| A05 | Injection | Down from third | SQL injection, cross-site scripting, command injection |
| A06 | Insecure Design | Down from fourth | Password reset that can be brute-forced by design |
| A07 | Authentication Failures | Same rank, renamed | No rate limiting, credential stuffing, weak sessions |
| A08 | Software or Data Integrity Failures | Same rank | Unsigned updates, unsafe deserialisation |
| A09 | Security Logging and Alerting Failures | Same rank, renamed | A breach runs for months because nobody is alerted |
| A10 | Mishandling of Exceptional Conditions | New | An error makes an authorisation check "fail open" |
What Changed From the 2021 Edition
- Two new categories: Software Supply Chain Failures replaces and widens "Vulnerable and Outdated Components", and Mishandling of Exceptional Conditions covers errors, crashes and fail-open logic.
- SSRF merged into access control: server-side request forgery, tenth in 2021, is now part of A01, because it is really a failure to control what the server may access.
- Misconfiguration rises: cloud settings, containers and complex frameworks have made unsafe configuration the second most important risk.
- A focus on root causes: as Fastly's summary notes, categories increasingly describe underlying causes rather than symptoms.
The data behind the list comes from application testing contributed by security firms plus a community survey. Broken access control alone covers 40 weakness types and appeared in an average of 3.73% of the applications tested.
A01 to A10 Explained With Examples
A01 Broken Access Control
Users can act outside their permissions: viewing other people's records by changing an ID (known as an insecure direct object reference, or IDOR), calling admin APIs as a normal user, or making the server fetch internal URLs (SSRF). The fix is to enforce authorisation on the server for every request, deny by default and check ownership of every record. The code below shows a vulnerable and a fixed invoice lookup, plus an SSRF allowlist, following the OWASP SSRF cheat sheet.
// owasp-demo.mjs: three OWASP Top 10:2025 risks as vulnerable and fixed code
import { isIP } from "node:net";
const invoices = [
{ id: 101, ownerId: "alice", total: 1200 },
{ id: 102, ownerId: "bob", total: 89 },
];
// A01 Broken Access Control (IDOR): the vulnerable handler trusts the ID in the URL
function getInvoiceVulnerable(user, id) {
return invoices.find((i) => i.id === id) ?? null;
}
// Fixed: always check that the record belongs to the signed-in user
function getInvoice(user, id) {
const invoice = invoices.find((i) => i.id === id);
if (!invoice || invoice.ownerId !== user.id) return { status: 404 }; // do not reveal it exists
return { status: 200, invoice };
}
// A10 Mishandling of Exceptional Conditions: what happens when the permission check fails?
async function checkPermission(user) {
throw new Error("permission service timed out");
}
async function canExportFailOpen(user) {
try { return await checkPermission(user); } catch { return true; } // "don't block users if it's down"
}
async function canExport(user) {
try { return await checkPermission(user); } catch (err) {
console.error("permission check failed:", err.message); // log it, then deny
return false;
}
}
// A01 now includes SSRF: never fetch arbitrary user-supplied URLs from the server
const ALLOWED_HOSTS = new Set(["images.example-cdn.com", "api.partner.example"]);
function safeOutboundUrl(input) {
let url;
try { url = new URL(input); } catch { return { ok: false, reason: "not a URL" }; }
if (url.protocol !== "https:") return { ok: false, reason: "only https is allowed" };
if (isIP(url.hostname.replace(/^\[|\]$/g, ""))) return { ok: false, reason: "raw IP addresses are blocked" };
if (!ALLOWED_HOSTS.has(url.hostname)) return { ok: false, reason: `host ${url.hostname} is not on the allowlist` };
return { ok: true, url: url.href };
}
const bob = { id: "bob" };
console.log("vulnerable: bob reads invoice 101 ->", getInvoiceVulnerable(bob, 101)?.total);
console.log("fixed: bob reads invoice 101 ->", getInvoice(bob, 101).status);
console.log("fail-open export allowed:", await canExportFailOpen(bob));
console.log("fail-closed export allowed:", await canExport(bob));
for (const u of ["http://169.254.169.254/latest/meta-data/", "https://[::1]/admin", "https://evil.example/x", "https://images.example-cdn.com/a.png"]) {
console.log(u, "->", JSON.stringify(safeOutboundUrl(u)));
}
Running it with Node.js prints:
vulnerable: bob reads invoice 101 -> 1200
fixed: bob reads invoice 101 -> 404
fail-open export allowed: true
permission check failed: permission service timed out
fail-closed export allowed: false
http://169.254.169.254/latest/meta-data/ -> {"ok":false,"reason":"only https is allowed"}
https://[::1]/admin -> {"ok":false,"reason":"raw IP addresses are blocked"}
https://evil.example/x -> {"ok":false,"reason":"host evil.example is not on the allowlist"}
https://images.example-cdn.com/a.png -> {"ok":true,"url":"https://images.example-cdn.com/a.png"}
Notice that the fixed handler returns 404 rather than 403, so attackers cannot even confirm that invoice 101 exists. For SSRF, also resolve the hostname and block private IP ranges at connection time, or attackers can point an allowed-looking domain at an internal address. APIs are especially prone to access-control bugs; see our guide to API security best practices.
A02 Security Misconfiguration
Default credentials, sample apps left installed, directory listing, missing security headers, public cloud storage and detailed error pages all fall here. Automate secure configuration so it cannot drift. For an Express app, a few lines remove the most common problems:
// app.mjs: A02 Security Misconfiguration and A10 basics for an Express app
import express from "express";
import helmet from "helmet";
const app = express();
app.disable("x-powered-by"); // do not advertise the framework
app.use(helmet()); // secure headers: CSP, HSTS, frame-ancestors and more
app.use(express.json({ limit: "100kb" })); // reject oversized bodies instead of crashing
app.get("/healthz", (req, res) => res.send("ok"));
// Central error handler: log details privately, return a generic message
app.use((err, req, res, next) => {
console.error({ path: req.path, message: err.message, stack: err.stack });
res.status(err.status ?? 500).json({ error: "Something went wrong" });
});
app.listen(process.env.PORT ?? 3000);
Helmet sets sensible headers in one line, and the error handler keeps stack traces in your logs instead of the browser.
A03 Software Supply Chain Failures
Your application is mostly other people's code. This category covers vulnerable libraries, compromised packages, poisoned build pipelines and unsigned artefacts. The npm worm attacks of 2025 showed how quickly a stolen maintainer token can spread malware to thousands of projects. Our guide to software supply chain security covers lockfiles, provenance and trusted publishing.
A04 Cryptographic Failures
Sensitive data sent without TLS, passwords hashed with MD5 or SHA-1, home-made encryption and hard-coded keys. Use HTTPS everywhere, hash passwords with Argon2id or bcrypt, encrypt sensitive fields with well-reviewed libraries and keep keys in a secrets manager, as explained in our secrets management guide. Looking ahead, plan for post-quantum algorithms too.
A05 Injection
Untrusted input is treated as code: SQL, NoSQL, operating system commands, LDAP or HTML and JavaScript in the browser. MITRE's 2025 CWE Top 25 ranks cross-site scripting first and SQL injection second among all software weaknesses. Use parameterised queries, safe APIs and context-aware output encoding; our deep dives on SQL injection and cross-site scripting show both with code.
A06 Insecure Design
Some flaws cannot be fixed by perfect code because the design is wrong: a password reset that relies on guessable security questions, a checkout that trusts prices sent by the browser, or no limit on how many gift cards can be tried. Threat-model new features, write abuse cases next to user stories and use secure design patterns.
A07 Authentication Failures
Weak passwords allowed, no protection against credential stuffing, session IDs in URLs or sessions that never expire. Add multi-factor authentication or passkeys, rate-limit logins, check passwords against breach lists and rotate session IDs after login. See our guide to two-factor authentication.
A08 Software or Data Integrity Failures
Accepting code or data without checking where it came from: auto-updates without signatures, CI pipelines that run untrusted pull requests with secrets, or deserialising untrusted objects. Sign artefacts, verify signatures and keep build systems locked down.
A09 Security Logging and Alerting Failures
Without logs of logins, access-control failures and admin actions, and without alerts on suspicious patterns, breaches go unnoticed. Log security events with user, time and source, protect the logs from tampering and alert on anomalies.
A10 Mishandling of Exceptional Conditions
Programs that crash, leak data in error messages or, worst of all, fail open. In the demo above, the "fail-open" version grants an export when the permission service times out, which is exactly what an attacker would try to trigger. Handle errors explicitly, fail closed for security decisions, set timeouts and limits, and test what happens when dependencies are slow or down.
How to Use the OWASP Top 10 in Your Team
- Train developers on the ten risks using your own stack's examples.
- Turn it into requirements with the OWASP Application Security Verification Standard, which lists testable controls.
- Automate checks in CI: static analysis such as Semgrep, dependency and container scanning with Trivy, and dynamic scans with ZAP.
- Use the OWASP Cheat Sheet Series as the coding reference for each fix.
- Test regularly with the Web Security Testing Guide and periodic penetration tests; our application security audit guide explains the process.
- Track and fix findings by risk, not just by tool severity.
Speed matters. Verizon's 2026 Data Breach Investigations Report found that exploiting vulnerabilities became the most common way into organisations, at 31% of breaches, as TechRepublic reported. Many of those vulnerabilities fall squarely into the OWASP categories.
OWASP Top 10 vs CWE Top 25
| OWASP Top 10 | CWE Top 25 | |
|---|---|---|
| Published by | OWASP community | MITRE with CISA |
| Scope | Web application risk categories | Specific software weaknesses in all kinds of software |
| Based on | Contributed test data plus a practitioner survey | Analysis of recent CVE records |
| Updated | Every few years (2017, 2021, 2025) | Every year |
| 2025 leaders | Broken access control, misconfiguration, supply chain | Cross-site scripting, SQL injection, CSRF, missing authorisation |
Use the OWASP Top 10 to organise training and priorities, and the CWE list when you need precise weakness identifiers in tools and reports.
The Top 10 and AI-Built Software
AI coding assistants write code fast, but they reproduce the same classic mistakes, from missing authorisation checks to string-built SQL. Review AI-generated code against these ten categories like any other code. Applications that use large language models face extra risks, such as prompt injection, covered by OWASP's separate Top 10 for LLM Applications and our guide to AI agent security. For a broader checklist for websites, see how to protect your website from hackers and the most common security mistakes we find in audits.
Frequently Asked Questions
What is the OWASP Top 10?
It is a regularly updated list of the ten most critical security risk categories for web applications, published by OWASP to help developers and organisations prioritise their security work.
What is new in the OWASP Top 10 2025?
Two new categories, Software Supply Chain Failures and Mishandling of Exceptional Conditions; server-side request forgery merged into Broken Access Control; and Security Misconfiguration rising to second place.
What is number one in the OWASP Top 10?
Broken Access Control, which covers users acting outside their intended permissions, such as viewing other users' data, using admin functions or making the server fetch internal resources.
Is the OWASP Top 10 a compliance standard?
No. It is an awareness document. For testable requirements, use the OWASP ASVS. Many standards and contracts still reference the Top 10 as a minimum baseline.
How often is the OWASP Top 10 updated?
Roughly every three to four years. Recent editions were published in 2017, 2021 and 2025.
Does following the OWASP Top 10 make my app secure?
It covers the most common and serious risks, but not everything. Combine it with secure design, regular testing, dependency management and monitoring.
Secure Your Application With Our Team
We review code and architecture against the OWASP Top 10, fix vulnerabilities and add automated security testing to your pipeline. Contact our team for an application security review.
