smaple.tr
Security

OWASP Top 10 2025: What Changed and How to Fix Each Risk

Mehmet Kurtipek
June 23, 2026
16 min read
Security
OWASP Top 10
Application security
Web security
Supply chain security

The OWASP Top 10:2025 is the current edition of OWASP's list of the most serious web application security risks, and it replaces the 2021 list. In order, the ten are Broken Access Control, Security Misconfiguration, Software Supply Chain Failures, Cryptographic Failures, Injection, Insecure Design, Authentication Failures, Software or Data Integrity Failures, Security Logging and Alerting Failures, and Mishandling of Exceptional Conditions. Compared with 2021, server-side request forgery (SSRF) is now part of access control, misconfiguration climbed from fifth to second, and two categories are new or rebuilt: supply chain failures (A03) and exceptional conditions (A10).

The 2025 list and what changed since 2021

2025

Category

Where it was in 2021

A01

Broken Access Control

A01; now also includes SSRF (the old A10)

A02

Security Misconfiguration

A05

A03

Software Supply Chain Failures

A06 Vulnerable and Outdated Components, with a much wider scope

A04

Cryptographic Failures

A02

A05

Injection

A03

A06

Insecure Design

A04

A07

Authentication Failures

A07, renamed from Identification and Authentication Failures

A08

Software or Data Integrity Failures

A08, "and" became "or"

A09

Security Logging and Alerting Failures

A09, "Monitoring" became "Alerting"

A10

Mishandling of Exceptional Conditions

New

The ranking comes from data plus a survey. According to OWASP's introduction to the 2025 edition, contributors shared test results from more than 2.8 million applications, and 589 CWEs (the weakness types in MITRE's catalogue) were analysed. Eight categories were picked from that data. The other two, supply chain failures and logging and alerting, were voted in through a community survey, because they are hard to see in automated test results.

Don't read a drop in rank as permission to relax. Injection sliding to fifth doesn't make an app that builds SQL from strings any safer than it was in 2021. The two new entries matter more than the reshuffle, because they describe failures most teams never test for: a CI pipeline that can push to production with one leaked token, or an authorization check that answers "allow" when the policy service times out.

How to use the list, and how not to

OWASP calls the Top 10 an awareness document and describes it as the bare minimum for coding and testing. For anyone who wants a standard they can verify, it recommends the Application Security Verification Standard (ASVS), whose 5.0 release came out in May 2025. In practice:

  • Use the Top 10 to decide what your team learns first and what a code review looks at first.
  • Use ASVS when you need requirements you can tick off, for a contract, a security questionnaire or an internal policy.
  • When a proposal or a tool's marketing says "OWASP Top 10 compliant", ask which tests were run and against which version of the list.

The ten risks and what to do about each

A01: Broken Access Control

Access control is broken when a user can read or change something they shouldn't: another customer's invoice, an admin endpoint, a record reached by changing an ID in the URL. It stays at number one, and OWASP's data found some form of it in every application tested. SSRF (CWE-918) is counted here now; cross-site request forgery (CWE-352) already was in 2021.

In business software, this bug usually looks like a query that forgets whose data it is reading. Several of the platforms we've built for clients hold many organizations or roles in one system. Oplist, the hospital shift-scheduling SaaS we build for, has organizations, roles and approval workflows. Planard's budgeting product is a multi-company SaaS. Tribute's data-migration platform has four roles, from superadmin down to client. In apps shaped like these, a security review should start with every endpoint that takes an ID.

// Vulnerable: any signed-in user can read any invoice by changing the id
app.get('/api/invoices/:id', requireAuth, async (req, res) => {
  const { rows } = await pool.query('SELECT * FROM invoices WHERE id = $1', [req.params.id]);
  res.json(rows[0]);
});

// Fixed: the query itself is limited to the caller's company
app.get('/api/invoices/:id', requireAuth, async (req, res) => {
  const { rows } = await pool.query(
    'SELECT id, number, total_amount, issued_at FROM invoices WHERE id = $1 AND company_id = $2',
    [req.params.id, req.user.companyId]
  );
  if (rows.length === 0) return res.sendStatus(404);
  res.json(rows[0]);
});

To keep it fixed as the codebase grows:

  • Deny by default, and put the scoping in one place (a repository function or a middleware) so each new handler doesn't have to remember it.
  • Return 404 for records that belong to another company, so the API doesn't confirm they exist.
  • Write a test that signs in as a user from company B and requests company A's records. OWASP lists access-control tests in unit and integration suites among its prevention steps, and this is the test that catches the new endpoint someone adds six months from now.

SSRF moved here because it is the server being tricked into reaching something on the attacker's behalf. If your app fetches a URL that a user supplied (webhooks, "import from URL", link previews, HTML-to-PDF rendering), allow only the destinations you expect, resolve the hostname and refuse private and link-local addresses, and don't follow redirects blindly. On AWS the classic target is the instance metadata service at 169.254.169.254, which can hand out the instance's IAM credentials. Requiring IMDSv2 means a plain GET can no longer read them:

aws ec2 modify-instance-metadata-options \
  --instance-id i-1234567890abcdef0 \
  --http-tokens required \
  --http-endpoint enabled

Check the MetadataNoToken CloudWatch metric first, so you know nothing on the instance still makes IMDSv1 calls.

A02: Security Misconfiguration

Up from fifth to second. This category covers everything that is insecure because of how it was set up: default admin passwords, directory listing, sample apps left on a server, cloud storage open to the internet, missing security headers, and error pages that print stack traces.

That last one is easy to ship by accident. Express's built-in error handler writes the full stack trace into the response unless NODE_ENV is set to production. A container that misses one environment variable tells an attacker your file paths and which libraries you use. The check takes a minute: make an endpoint fail in staging and in production, and read what comes back.

OWASP's other fixes here are specific too. Build every environment with the same hardening script or infrastructure as code, with different credentials in each. Send security headers. Replace static secrets sitting in code, config files and pipelines with short-lived credentials or the platform's own role-based access.

A03: Software Supply Chain Failures

This replaces 2021's Vulnerable and Outdated Components and widens it. Besides libraries with known CVEs, it covers every link between a developer's laptop and production: package registries, build pipelines, IDE extensions and artifact stores. It is hard to find with testing tools (only 11 CVEs map to its CWEs), so it came in through the community survey, where exactly half of the respondents ranked it first. Where it was tested, it had the highest average incidence rate of any category, 5.19%.

The 2025 example that made it concrete was Shai-Hulud, which OWASP describes as the first successful self-propagating npm worm. It ran through post-install scripts, harvested secrets from the machine, used any npm tokens it found to publish itself into more packages, and reached over 500 package versions before npm stopped it. A team that ran npm install at the wrong moment could have carried it onto a laptop or a CI runner without changing a line of their own code.

What helps, roughly in order of effort:

npm ci    # CI: install exactly what the lockfile says (add --ignore-scripts on npm 11 or older)
npm sbom --sbom-format cyclonedx > sbom.cdx.json    # keep a bill of materials with each release
; .npmrc (npm 11.10 or later): only resolve versions that have been public for at least 7 days
min-release-age=7
  • Commit the lockfile and install from it in CI. Since npm 12 (July 2026), dependency install scripts, the hook Shai-Hulud used, are blocked by default: npm skips them for any package that your package.json's allowScripts field hasn't approved, and lists what it skipped. Approve the few that genuinely need one (native modules, some binary downloads) with npm install-scripts approve <package>, and set strict-allow-scripts=true if you'd rather have CI fail on a new, unreviewed script than print a warning. pnpm likewise skips dependency build scripts unless you list the package under allowBuilds. On npm 11 or older, --ignore-scripts is the blunt version of the same protection; it also skips your own package's install scripts, so run the ones you need deliberately.
  • A release cooldown gives the registry and the community time to catch a poisoned version. npm's min-release-age (npm 11.10 and later) counts days; pnpm's minimumReleaseAge counts minutes and defaults to one day since pnpm 11. It applies when versions are resolved, so it protects npm install and updates, while npm ci installs the lockfile as it is.
  • Turn on MFA for registry and Git hosting accounts, and limit who can change the pipeline. OWASP specifically calls out CI/CD pipelines that are weaker than the systems they deploy.
  • Watch advisories for what's in your SBOM. Automated dependency scanning in CI is covered in our DevSecOps guide.

The unglamorous half of A03 is keeping runtimes current. When we were the engineering team for Diderot, Carnegie Mellon's course platform, the work included upgrading the AWS Elastic Beanstalk platform and the Python version, plus dependency upgrades, all while courses were running on it. An app that nobody upgrades drifts into this category without anyone touching it, so plan upgrades as recurring work with its own budget.

A04: Cryptographic Failures

Down two places to fourth. For passwords, use Argon2id with at least 19 MiB of memory, 2 iterations and a parallelism of 1, per OWASP's Password Storage Cheat Sheet. If Argon2id isn't available, use scrypt; if you need FIPS-140, PBKDF2-HMAC-SHA-256 with 600,000 or more iterations. Keep bcrypt for legacy systems only, and remember that most implementations ignore everything past 72 bytes of input. MD5, SHA-1 or a single round of SHA-256 is not password hashing at all.

Weak randomness is a frequent finding here. In Node that usually means Math.random() generating a password-reset token or an invite code; use crypto.randomBytes(32).toString('base64url') instead. For data in transit, allow TLS 1.2 or later with forward-secrecy ciphers and turn on HSTS so browsers don't fall back to plain HTTP. For data at rest, encrypt what's sensitive, keep keys out of the repository, and delete what you no longer need, because data you don't keep can't leak.

OWASP also asks teams to start preparing for post-quantum cryptography, with high-risk systems safe by the end of 2030. For most web apps, the useful first step is an inventory of where cryptography lives in your code and infrastructure, so it can be swapped later.

A05: Injection

SQL injection, cross-site scripting (XSS has been part of this category since 2021), OS command injection and their relatives. It slid from third to fifth, and the CVE databases are still full of it. Parameterized queries are the fix, and the A01 snippet above already uses them ($1, $2).

The gap parameters can't close is structural input: table names, column names, sort direction. Those can't be passed as parameters, so map user input onto a fixed list:

const SORT_COLUMNS = new Map([
  ['date', 'issued_at'],
  ['total', 'total_amount'],
]);

app.get('/api/invoices', requireAuth, async (req, res) => {
  const column = SORT_COLUMNS.get(req.query.sort) ?? 'issued_at';
  const { rows } = await pool.query(
    `SELECT id, number, total_amount, issued_at FROM invoices
     WHERE company_id = $1 ORDER BY ${column} DESC LIMIT 50`,
    [req.user.companyId]
  );
  res.json(rows);
});

For XSS, modern frameworks escape output by default, so look for the places where someone switched that off: dangerouslySetInnerHTML in React, v-html in Vue, bypassSecurityTrustHtml in Angular, and unescaped variables in server templates. If user-supplied HTML has to be rendered, sanitize it with a maintained library such as DOMPurify and add a Content Security Policy.

OWASP mentions prompt injection in this category and covers it properly in its separate Top 10 for LLM applications. If your app passes user text to a model that can call tools or read private data, read that list as well.

A06: Insecure Design

This category is about controls that were never designed, or designed in a way that can't work. A sound design that was coded badly belongs to one of the other nine. OWASP's point is that perfect code can't add a control nobody planned. Its examples are business-logic abuse: a cinema chain that asks for a deposit only on group bookings above fifteen people, which lets an attacker hold hundreds of seats in a few requests, or a retailer whose launch-day stock goes to scalper bots.

You catch these before the code exists. For every flow that moves money, grants rights or changes state, ask how someone would abuse it and write the answer down as a misuse case next to the user story. Can a user approve their own request? What happens if the same request arrives twice in the same second? Can a free trial be restarted forever with a new email address? Each answer becomes a test. Threat modelling is covered in more depth in our secure SDLC guide.

A07: Authentication Failures

Same position, shorter name. The fixes are well known and still skipped:

  • Offer MFA everywhere and require it for admin accounts.
  • Slow down credential stuffing with rate limits per account and per IP, and by detecting one source trying many accounts.
  • Check new and changed passwords against lists of breached passwords (OWASP points to Have I Been Pwned) instead of relying on complexity rules. Don't force periodic rotation; in line with NIST SP 800-63B, force a change only when you suspect a breach.
  • Issue a new session ID after login, keep it out of URLs, and invalidate it on logout and after idle and absolute timeouts. If you use JWTs, keep them short-lived and pair them with refresh tokens you can revoke.
  • Remove security questions. NIST 800-63B and ASVS both prohibit them.

A08: Software or Data Integrity Failures

A close relative of A03, one level down: trusting code or data without checking where it came from. Unsigned updates, packages downloaded from random websites, pipelines anyone can edit, and objects deserialized straight from the client all belong here.

One of OWASP's scenarios is easy to create by accident. A company points a subdomain at a third-party support tool, and session cookies set for the parent domain start travelling to that vendor. Scope session cookies to the host that needs them. The __Host- cookie prefix enforces this: the browser rejects such a cookie unless it is Secure, has Path=/ and has no Domain attribute. Beyond cookies, sign build artifacts and verify the signature at deploy time, require review for changes to pipeline configuration, and accept plain JSON validated against a schema instead of serialized objects from the client.

A09: Security Logging and Alerting Failures

The rename carries the message: logs nobody is alerted on don't stop anything. OWASP's examples include breaches that ran for years until an outside party noticed.

Log failed logins, access-control denials and server-side validation failures with enough context to identify the account. Keep passwords, tokens and personal data out of log lines (CWE-532), and encode what you log so nobody can forge entries (CWE-117). Then decide which patterns wake someone up. The 404s from the A01 fix are a good first rule: one account collecting hundreds of 404s on sequential IDs is someone probing, and a person should know within minutes. What happens after the alert is covered in our incident response guide.

A10: Mishandling of Exceptional Conditions

New in 2025, with 24 CWEs, some of which used to sit in a vague "poor code quality" bucket. It is about what your app does when something unexpected happens: an exception, a timeout, a full disk, a transaction that stops halfway. The failures that become security problems are failing open (an error during a check is treated as permission), error messages that leak internals, resources that are never released until the service falls over, and multi-step operations that leave inconsistent state behind.

async function canApprove(user, request) {
  try {
    return await policy.allows(user, 'approve', request);
  } catch (err) {
    logger.error({ err, userId: user.id, requestId: request.id }, 'policy check failed');
    return false; // fail closed: an error in the check means "no"
  }
}

Wrap multi-step writes in a database transaction and roll the whole thing back on error, so money can't leave one account without arriving in the other and the audit entry can't go missing. Put limits on everything that consumes resources: upload sizes, request rates, queue lengths, retries.

Rate limits are a common case. With an automation agency partner, we built an n8n workflow for an oilfield services company: it picks up the field tickets that arrive by Gmail and extracts their data with an LLM. Most of what broke was the LLM API's rate limit (HTTP 429), and the fix was falling back to alternative models, so a ticket still gets processed when one model is rate-limited. Whatever the fallback is, it has to pass the same validation as the main path: if it skips the checks, anyone who can trigger the error can skip them too.

Where to start with an app that's already live

In the first few days, this order covers the most ground:

  1. Call every endpoint that returns or changes a record by ID as a user from another organization or role. (A01)
  2. Make the app throw an error in staging and in production, and read the response body. (A02, A10)
  3. Install from the lockfile in CI, set a release cooldown, generate an SBOM, and check who can change the pipeline. (A03, A08)
  4. Find out which algorithm and parameters your password hashes use. (A04)
  5. Search the code for SQL built with string concatenation or template literals, and for the framework's raw-HTML escape hatch. (A05)
  6. Check that failed logins and access-control denials raise an alert that a person actually sees. (A09)

Once these basics are in place, an outside penetration test is a good way to check the result; this post on penetration testing covers scope and how to choose a vendor.

Frequently asked questions

How often is the OWASP Top 10 updated?

The last three editions are dated 2017, 2021 and 2025, so roughly every four years. OWASP's project page now lists the 2025 list as the current release.

Is the 2021 list still valid?

It's still online and most of its advice holds, but reports, scanner configurations and contracts should use the 2025 IDs now. The table at the top maps old categories to new ones.

Does the Top 10 cover APIs and AI features?

It covers web applications in general, including their APIs. OWASP also publishes a separate API Security Top 10 and a Top 10 for LLM applications, which go deeper on those.

What does OWASP stand for?

Open Worldwide Application Security Project. The "W" stood for "Web" until the foundation's board changed it in 2023.

If you're planning a web app or API and want to talk through how it should handle access control from the first release, get in touch.

Related Articles

July 15, 2026

DevSecOps Pipeline: What to Scan, Where, and What Should Block

Secret, code, dependency, image and DAST scans for a small team's CI/CD pipeline: where each runs, what should block a merge, and a working GitHub Actions file.

Read More: DevSecOps Pipeline: What to Scan, Where, and What Should Block
July 2, 2026

Secure SDLC: What Each Phase Should Produce

What a secure SDLC adds to each phase of development: requirements you can test, a worked threat model for a CSV import, and where a small team should start.

Read More: Secure SDLC: What Each Phase Should Produce
June 22, 2026

Buying a Penetration Test: Scope, Cost Drivers and Preparation

A buyer's and developer's guide to penetration testing: what you pay for, how to scope and prepare, and what to do when the report arrives.

Read More: Buying a Penetration Test: Scope, Cost Drivers and Preparation