Bookmarks
ReferenceCybersecurityVerified

OWASP Top 10

OWASP Top 10 is a list of the most critical security risks to web applications. This reference covers access control, injection, the software supply chain, cryptography, CWEs and how to defend.

checked 1 Nov · next check 8 Nov · 52 min read

Sections
13
Reading
52 min
Languages
RU · UZ · EN
Written from
owasp.org/Top10

Check status of the reference

Verified 1 Nov · next check 8 Nov

The sections were compared with the release notes, the check found nothing, and all source links respond.

  1. Verified
  2. Scheduled check

What the OWASP Top 10 is and how to read it

The OWASP Top 10 is the OWASP Foundation’s list of the ten most critical security risks to web applications. Above all it is an awareness document: it explains what breaks most often and how to defend against it, but as a coding or verification standard it offers only a minimum.

The list is used to train developers and testers, in code review, and as a baseline of minimum requirements. You cannot fully verify an application “against the Top 10”: some risks, such as insecure design, are missed by most tests and scanners. OWASP states plainly that claims of full Top 10 coverage are untrue. Verifiable requirements come from another OWASP document, the ASVS (Application Security Verification Standard).

Each edition is built from data and a survey. Organisations contributed test results for more than 2.8 million applications. For every weakness in the CWE (Common Weakness Enumeration), the share of applications where it was found is calculated; exploitability and impact scores come from the CVSS of the related CVEs. Eight categories were chosen from the data and two more from a survey of practitioners, because data describes the past and new checks reach testing tools only weeks or even years later. Categories are grouped by root cause (“cryptographic failure”) rather than by symptom (“data exposure”), and each contains between 5 and 40 CWEs.

Risks in the 2025 edition

CodeRiskIn the 2021 edition
A01:2025Broken Access ControlA01 and A10 Server-Side Request Forgery (SSRF)
A02:2025Security MisconfigurationA05
A03:2025Software Supply Chain FailuresA06 Vulnerable and Outdated Components, expanded
A04:2025Cryptographic FailuresA02
A05:2025InjectionA03
A06:2025Insecure DesignA04
A07:2025Authentication FailuresA07 Identification and Authentication Failures
A08:2025Software or Data Integrity FailuresA08 Software and Data Integrity Failures
A09:2025Security Logging and Alerting FailuresA09 Security Logging and Monitoring Failures
A10:2025Mishandling of Exceptional Conditionsnew category

The main changes: SSRF has been folded into broken access control, and misconfiguration has risen from 5th place to 2nd. Vulnerable components have been widened to the whole supply chain and moved up from 6th to 3rd, while 10th place goes to a new category on error handling. Cryptography, injection and insecure design each dropped two places; A07–A09 kept their positions, with all three renamed more precisely.

Blue arrows show categories that changed position; the dashed arrow is SSRF merging into A01; the blue tile is the new category A10.

How to read a risk page

Every risk page on the OWASP Top 10 website has the same structure:

  • “Background” — the ranking and the most notable CWEs in the category
  • “Score table” — the category’s numeric metrics, explained in the table below
  • “Description” — the signs that an application is vulnerable
  • “How to prevent” — defensive measures
  • “Example attack scenarios” — worked attacks
  • “List of Mapped CWEs” — the full list of CWEs in the category
MetricWhat it means
CWEs MappedHow many CWEs are assigned to the category
Incidence RateThe share of tested applications where the weakness was found; how many times it occurs within one application is not counted
CoverageThe share of applications that were tested for this weakness at all
Weighted Exploit, Weighted ImpactAverage exploitability and impact scores from CVSS v2 and v3 for CVEs with these CWEs, on a scale up to 10
Total OccurrencesHow many applications contain at least one CWE from the category
Total CVEsHow many CVEs in the NVD are linked to the category’s CWEs

OWASP describes the candidates that did not make the list separately:

  • X01:2025 Lack of Application Resilience — resilience under load and failure
  • X02:2025 Memory Management Failures — memory handling errors
  • X03:2025 Inappropriate Trust in AI Generated Code — trusting code from AI assistants without review

How it differs from the ASVS

OWASP advises when to use the Top 10 and when to use the ASVS:

TaskOWASP Top 10ASVS
Awarenessyes—
Trainingentry levelfull course
Coding standard, code reviewminimumyes
Unit and integration testssometimesyes
Penetration testingminimumyes
Tool supportminimumyes, the only acceptable option

The MITRE CWE Top 25 is a list of individual weaknesses, whereas the Top 10 groups several CWEs into a category. There are two reasons: not every CWE occurs in every language and framework, and different testers describe the same vulnerability with different CWEs.

What to know first

  • Requests, responses, status codes and cookies — see the “HTTP and REST” reference.
  • The basics of SELECT and WHERE queries — see the SQL reference.
  • What CVE and CVSS are and how to prioritise fixes — see the “Vulnerability management (CVE, CVSS)” reference.

Section sources

the section is written from these pages

Checklist

Go through this list before a release and when reviewing a new module. Each item is explained in the section for its risk; a full audit needs the ASVS.

A01 Access control

  • Check permissions on the server on every request for an object: look the record up by id and the owner from the session, not by id alone.
  • Deny everything by default except public resources, and keep the checks in one shared mechanism.
  • Send outgoing server requests only to hosts on an allow list, and do not follow redirects.

A02 Configuration

  • Turn off debug mode and verbose errors in production.
  • Remove default accounts, sample applications and unused features.
  • Send security headers on every response and check environment settings automatically.

A03 Supply chain

  • Keep the lock file in the repository and install dependencies in CI from it (npm ci).
  • Scan dependencies for known vulnerabilities in every build and maintain an SBOM.
  • Do not let one person take code to production without another person’s review.

A04 Cryptography

  • Hash passwords with Argon2id or scrypt, not MD5, SHA-1 or SHA-256.
  • Transmit data only over TLS 1.2 or later and enable HSTS.
  • Generate tokens and keys with a cryptographically secure generator and keep keys out of the code.

A05 Injection

  • Pass SQL parameters separately from the query text.
  • Choose column names and sort direction only from a list defined in the code.
  • Output user data through the template’s auto-escaping or textContent, not innerHTML.

A06 Design

  • Model threats for sign-in, permissions, payments and other key flows.
  • Write abuse cases next to user stories and cover them with tests.
  • Limit resources per user: orders, seats, requests per period.

A07 Authentication

  • Enable MFA, and make it mandatory for administrators.
  • Check new passwords against lists of leaked passwords and do not require periodic changes.
  • Issue a new session identifier after sign-in and set the session cookie to Secure, HttpOnly and SameSite.

A08 Integrity

  • Do not deserialise native objects (pickle, Java serialisation) from untrusted data.
  • Load scripts from third-party CDNs with the integrity attribute.
  • Verify the signatures of updates and artefacts before installing them.

A09 Logging and alerting

  • Log sign-ins, access denials and input validation errors, but not passwords or tokens.
  • Write logs in a structured format such as JSON, so that input cannot forge entries.
  • Set up alerts for repeated denials and check that they reach the on-call team.

A10 Exceptional conditions

  • Handle errors in one global handler: a generic response for the client, details in the log.
  • When a check fails, deny the action rather than allow it.
  • Roll back the whole transaction if an error occurs at any of its steps.

Full audit with the ASVS

ASVS 5.0.0 has about 350 verifiable requirements in 17 chapters and three verification levels. Level L1 is the minimum, about 20% of the requirements. L2 is the goal for most applications: together with L1 it is about 70% of the requirements. L3 is for applications that need the highest level of protection. Requirements are cited by number with the version: v5.0.0-1.2.5 is the fifth requirement of section 1.2 Injection Prevention.

RiskWhere to look in ASVS 5.0
A01 Access controlV8 Authorization
A02 ConfigurationV13 Configuration
A03 Supply chainV15 Secure Coding and Architecture
A04 CryptographyV11 Cryptography, V12 Secure Communication, V14 Data Protection
A05 InjectionV1 Encoding and Sanitization, V2 Validation and Business Logic
A06 DesignV2 Validation and Business Logic
A07 AuthenticationV6 Authentication, V7 Session Management
A08 IntegrityV1 Encoding and Sanitization, section V1.5 Safe Deserialization
A09 Logging and alertingV16 Security Logging and Error Handling
A10 Exceptional conditionsV16 Security Logging and Error Handling, section V16.5 Error Handling

What to build into the code from the very start is described by the OWASP Top 10 Proactive Controls 2024. These are ten measures for developers, numbered C1–C10, for example C1 Implement Access Control.

Section sources

the section is written from these pages

A01:2025 Broken access control

Broken access control means a user acts outside their permissions: reading or changing other people’s data, or performing administrator actions. A permission check works only when the server performs it, on every request and for every object.

The category remains in first place: in the 2025 data, some form of it was found in every application tested. It contains 40 CWEs. Since 2025 it also includes server-side request forgery (SSRF), which was a separate category, A10, in 2021.

What it looks like

  • Insecure direct object reference (IDOR): in /orders/43, the attacker changes the number and gets someone else’s order.
  • Bypassing a check by altering the URL, parameters, hidden form fields or by calling the API directly.
  • An API with no permission check on POST, PUT and DELETE.
  • Privilege escalation: acting without signing in, or an ordinary user acting with administrator rights.
  • Forging a JWT, cookie or hidden field to gain privileges.
  • A CORS misconfiguration that exposes the API to untrusted origins.
  • Forced browsing: an administrator page opens at its direct address.

The classic case is IDOR. The application checks that the user is signed in, but not that the object belongs to them. Without an owner check, the server finds the order by id alone and returns it. With the check, the query looks up both id and owner, and for someone else’s order the server responds exactly as it would for one that does not exist.

A 404 response does not reveal whether someone else’s order exists.

Bad and good in code

pythondon’t do this
# the order is looked up by the id from the URL onlydef get_order(order_id):    return db.execute(        "SELECT id, total FROM orders WHERE id = ?",        (order_id,),    ).fetchone()
pythondo this
# user_id comes from the session, not from the requestdef get_order(user_id, order_id):    row = db.execute(        "SELECT id, total FROM orders"        " WHERE id = ? AND owner_id = ?",        (order_id, user_id),    ).fetchone()    if row is None:        # someone else’s order is indistinguishable from a missing one: 404        raise LookupError(order_id)    return row

Hard-to-guess identifiers such as UUIDs are no substitute for a check: they make an address harder to guess, but the link can be obtained another way. If the owner can be determined from the session, do not accept their id from the request at all.

How to defend

  • Deny by default: without an explicit rule, only public resources are open.
  • Check permissions on the server on every request. Checks in browser JavaScript do not protect anything: the request can be sent with curl.
  • Implement access control once and use it throughout the application — a filter or middleware, not a check in every handler.
  • Tie records to their owner in the data model: a user changes only their own records.
  • Disable web server directory listing and remove .git and backups from the site root.
  • Log access denials and alert administrators about repeated denials.
  • Rate-limit API requests so that automated id enumeration hits a limit.
  • Invalidate the session on the server at sign-out, and keep JWTs short-lived.

Cover permissions with tests. Create users A and B with their own objects and check that A cannot read, change, delete or export B’s objects. Test both predictable and unpredictable ids.

SSRF: outgoing server requests

SSRF occurs when the server itself sends a request to an address supplied by the user: downloading an avatar from a URL, calling a webhook. The attacker substitutes an internal address — an internal service, a database, the cloud metadata service at 169.254.169.254 — and the server makes the call on its own behalf. Do not accept a whole URL: compare the host with an allow list and build the address yourself.

pythondo this
# the user picks a partner instead of entering a URLPARTNERS = {    "acme": "hooks.example.com",    "globex": "api.example.org",} def webhook_url(partner, order_id):    host = PARTNERS.get(partner)    if host is None:        raise PermissionError("partner is not allowed")    # the application sets the scheme and path    return f"https://{host}/orders/{int(order_id)}"

Related CWEs

CWEWhat it is
CWE-862Missing Authorization — there is no permission check at all
CWE-863Incorrect Authorization — there is a check, but it decides wrongly
CWE-639Authorization Bypass Through User-Controlled Key — bypassing permissions through a key from the request (IDOR)
CWE-200Exposure of Sensitive Information to an Unauthorized Actor — data is visible to someone who should not see it
CWE-352Cross-Site Request Forgery (CSRF) — an action performed on the user’s behalf by a request from another site
CWE-918Server-Side Request Forgery (SSRF) — the server sends a request to an address chosen by the attacker

Other CWEs in the category include path traversal (CWE-22) and open redirect (CWE-601). OAuth and token validation errors are covered in the “OAuth and OIDC” reference, in the “Security” section.

Section sources

the section is written from these pages

A02:2025 Security misconfiguration

Security misconfiguration means a system, application or cloud service is set up insecurely: debugging is on, default passwords remain, unnecessary features are exposed. The code may be free of bugs, yet the application is vulnerable because of a single setting.

In the 2025 edition the category rose from 5th place to 2nd: some misconfiguration was found in every application tested. The behaviour of applications is increasingly determined by configuration. The category contains 16 CWEs, including XML external entity injection (XXE, CWE-611).

Signs of a vulnerable configuration

SignExample
Missing hardening in some part of the stackCloud storage with open permissions
Unnecessary features enabledUnneeded ports, services, pages, accounts, test frameworks
Default accountsAn admin console with the factory password
Verbose errors exposedA stack trace and component versions in the response
New security features disabledAfter an upgrade, for backward compatibility
Insecure values in servers, frameworks, databasesFramework debug mode in production
No security headersResponses without X-Content-Type-Options and Content-Security-Policy
Static secretsA key in the code, a configuration file or the pipeline

Bad and good: Django settings

Debug mode shows a full traceback in the browser: code fragments, local variables, settings, the list of libraries. The Django documentation forbids enabling it in production and recommends reading the secret key from an environment variable:

pythondon’t do this
# debug is on, the key sits in the repositoryDEBUG = TrueSECRET_KEY = "django-insecure-change-me"
pythondo this
import os DEBUG = FalseSECRET_KEY = os.environ["SECRET_KEY"]ALLOWED_HOSTS = ["example.com"]

Before deploying, run the built-in check with the production settings — it finds some of these errors by itself:

bashon the server
python manage.py check --deploy

Security headers

Response headers turn on protection in the browser. A minimal set forbids guessing the content type, displaying the page in a frame (protection against clickjacking), and sending the full address in Referer to other sites. In Nginx, without the always parameter, the header is not added to every response code:

nginxnginx.conf
add_header X-Content-Type-Options "nosniff" always;add_header X-Frame-Options "DENY" always;add_header Referrer-Policy "strict-origin-when-cross-origin" always;

Do not enable the X-XSS-Protection header: in some cases it creates XSS itself; use a Content Security Policy instead. Remove the Server and X-Powered-By headers or make them uninformative.

XXE: XML external entities

An XML parser that allows external entities (XXE, XML external entity) will, on instruction from the document, read server files, make network requests or exhaust resources. This document asks for the contents of /etc/passwd to be substituted:

xmlmalicious XML
<?xml version="1.0"?><!DOCTYPE data [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><data>&xxe;</data>

Forbid DTDs if you do not need them. In Java, reject the DOCTYPE declaration on the parser factory:

javado this
DocumentBuilderFactory dbf =    DocumentBuilderFactory.newDefaultInstance();// a document with a DOCTYPE is rejected entirelydbf.setFeature(    "http://apache.org/xml/features/disallow-doctype-decl",    true);dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);Document doc = dbf.newDocumentBuilder().parse(untrustedStream);

In Python, parse untrusted XML with the defusedxml library instead of the standard parsers and, where there is a forbid_dtd=True parameter, enable it.

How to defend

  • Make environment setup repeatable and automated: development, testing and production are configured identically, but with different credentials.
  • Install a minimal platform — without samples, documentation and unused components.
  • Review settings along with updates and patches, including cloud storage permissions.
  • Separate components and tenants: segmentation, containers, cloud security groups.
  • Check the settings of all environments automatically; if there is no automation, check manually at least once a year.
  • Instead of static keys in code, use identity federation, short-lived credentials or platform roles.
  • Add central error interception so that details do not reach the client.

Related CWEs

CWEWhat it is
CWE-16Configuration — weaknesses introduced during software configuration
CWE-489Active Debug Code — debugging code left in production
CWE-611Improper Restriction of XML External Entity Reference — XXE
CWE-614Sensitive Cookie in HTTPS Session Without 'Secure' Attribute — a cookie without Secure
CWE-1004Sensitive Cookie Without 'HttpOnly' Flag — a cookie accessible to JavaScript
CWE-942Permissive Cross-domain Policy with Untrusted Domains — a policy such as CSP lets in untrusted domains

Protecting the server itself — SSH, firewall, updates — is covered in the “Linux server hardening” reference; HTTP headers as part of the protocol are covered in the “HTTP and REST” reference, in the “Security” section.

Section sources

the section is written from these pages

A03:2025 Software supply chain failures

Software supply chain failures are vulnerabilities and compromises in how software is built, distributed and updated: in third-party packages, build tools, CI/CD pipelines and registries. An attack on any link reaches production, even if your own code is flawless.

This category extends A06:2021 Vulnerable and Outdated Components. Besides components with known vulnerabilities, it covers package substitution and the compromise of build and distribution infrastructure. In the community survey, exactly half of the respondents ranked it first. It has few CVEs for its CWEs (only 11), but they have the highest average exploitability and impact scores.

The chain starts with source code and dependencies and ends in production. Each link has its own point of attack, and a substitution at any of them is passed down the chain:

The links run top to bottom in the order of delivery; on the right is an example attack on each link.

Signs of vulnerability

  • You do not know the exact versions of all components on the client and the server, including transitive ones (dependencies of dependencies).
  • Components are vulnerable, unsupported or out of date, from the OS and database to libraries and runtimes.
  • There is no regular scanning, and no subscription to security bulletins for your components.
  • Updates are applied monthly or quarterly, so a vulnerability stays open for days or months.
  • One person can write code and take it to production without review by anyone else.
  • The CI/CD pipeline is protected less well than the systems it builds and deploys.

Bad and good: npm dependencies

The lock file (package-lock.json) pins the verified versions of all dependencies. Keep it in the repository and install dependencies in CI with npm ci. It installs exactly what the lock file says, fails if the lock file disagrees with package.json, and never rewrites it. When they disagree, npm install does not stop; it updates the lock file.

bashnot in CI
# versions may drift from the verified onesnpm install
bashcorrect in CI
# exactly what package-lock.json saysnpm ci --ignore-scripts

The --ignore-scripts flag prevents lifecycle scripts from package.json files from running during installation, including the postinstall scripts of dependencies. This is how the Shai-Hulud worm spread in 2025: the postinstall script of infected packages collected confidential data on developers’ machines, and used the npm tokens it found to publish infected versions of other packages.

In npm 12, installation scripts of dependencies are blocked even without the flag unless the package is allowed in the allowScripts field of package.json: npm skips them with a warning. The --ignore-scripts flag also cancels these permissions, so if the project needs the scripts of allowed packages, run npm ci without it.

Checking for known vulnerabilities and package signatures is a separate pipeline step:

bashin CI
# fail if there are vulnerabilities of high severity or abovenpm audit --audit-level=high# package signatures and provenance from the registrynpm audit signatures

How to protect yourself

  • Maintain an SBOM (software bill of materials), a list of all components with their versions, centrally for all your software.
  • Track transitive dependencies and remove unused dependencies, features and files.
  • Monitor your components for vulnerabilities in CVE, NVD and OSV, and automate it: OWASP Dependency-Check, Dependency-Track, retire.js.
  • Take components only from official sources over secure channels, and prefer signed packages.
  • Choose the version of a dependency yourself and update when you need to, rather than floating to the latest.
  • Roll out updates in stages or as canaries, not to all systems at once.
  • Protect the repository, workstations, CI/CD and registries: MFA, least privilege, separation of duties, signed builds, secrets per environment.
  • Promote the same built artefact between environments instead of rebuilding it for each one.

Components run with the privileges of the application itself, so a vulnerability in a library is a vulnerability in the application. An example is Log4Shell (CVE-2021-44228) in Apache Log4j: remote code execution that ransomware and cryptominer attacks exploited.

If there is no fix yet for a vulnerable dependency, disable the vulnerable feature or isolate it. A wrapper that validates input works as a temporary measure only if it covers every path to the vulnerable code. Plan the update or replacement of the library straight away.

Related CWEs

This category has 6 CWEs:

CWEWhat it is
CWE-1104Use of Unmaintained Third Party Components: the component is no longer maintained
CWE-1395Dependency on Vulnerable Third-Party Component: a dependency with a known vulnerability
CWE-1329Reliance on Component That is Not Updateable: the component cannot be updated
CWE-1357Reliance on Insufficiently Trustworthy Component: the component is not trusted enough
CWE-477Use of Obsolete Function: a call to a deprecated function
CWE-10352017 Top 10 A9: Using Components with Known Vulnerabilities: a category from the 2017 edition

Scanning, SBOMs and CVE fix priorities are covered in the reference “Vulnerability management (CVE, CVSS)”; pipeline protection is in the CI/CD reference, in the “Security” section.

Section sources

the section is written from these pages

A04:2025 Cryptographic failures

Cryptographic failures mean that the necessary encryption is missing or weak: plaintext transmission, outdated algorithms, weak or leaked keys, passwords under a fast hash. This often leads to a leak of sensitive data or a compromised system.

The category dropped from 2nd to 4th place and has 32 CWEs. Among the most frequent are weak random number generators and insufficient entropy (CWE-338, CWE-331, CWE-1241), as well as broken or risky algorithms (CWE-327).

What to check

  • Which data needs protection: passwords, card numbers, medical and personal data, trade secrets.
  • Whether there are outdated algorithms and protocols, whether by default or in old code.
  • Whether default, weak or reused keys are in use, whether keys are stored in the repository, and whether they are rotated.
  • Whether the server certificate and the chain of trust are verified.
  • Whether ECB mode, a reused initialisation vector (IV) or encryption without authentication is used.
  • Whether a non-cryptographic random number generator is used for tokens and keys.
  • Whether MD5, SHA-1 or non-cryptographic hashes are used where a cryptographic one is needed.

Do and don’t

TaskDon’tDo
Storing passwordsMD5, SHA-1, SHA-256 and other fast hashes; a hash without a saltArgon2id; if it is unavailable, scrypt; bcrypt only in legacy systems; PBKDF2 if FIPS-140 is required
Tokens, keys, session IDsrandom in Python, Math.random() in JavaScriptsecrets in Python, crypto.randomBytes() in Node.js
Symmetric encryptionECB mode; CBC without a separate integrity checkAES with a key of 128 bits or more, preferably 256, in GCM or CCM mode
Public-key encryptionRSA without a padding schemeThe hybrid scheme HPKE; if you need RSA, RSAES-OAEP with a key of 2048 bits or more
Data in transitHTTP, FTP, STARTTLSTLS 1.2 or later only, with forward secrecy, and HSTS for HTTPS
Storing keysIn code and in the repositoryThe most important ones in a hardware or cloud HSM; key rotation

Bad and good: storing passwords

A fast hash can be brute-forced on graphics cards, and without a salt identical passwords produce identical hashes and are cracked with precomputed rainbow tables:

pythonnot like this
import hashlib # fast hash without a saltdigest = hashlib.md5(password.encode()).hexdigest()

You need a slow function with a unique salt. OWASP’s first choice is Argon2id, but it is not in Python’s standard library. So the example uses scrypt with the OWASP minimum parameters: N = 2¹⁷, r = 8, p = 1. Such a computation needs 128 MiB of memory (1 MiB = 1024² bytes), while the default OpenSSL limit is 32 MiB, so maxmem is raised. If your framework stores passwords itself, use its built-in mechanism.

pythoncorrect
import hashlibimport osimport secrets # OWASP minimum scrypt parametersN, R, P = 2**17, 8, 1MAXMEM = 256 * 1024**2 def hash_password(password: str) -> bytes:    salt = os.urandom(16)    key = hashlib.scrypt(password.encode(), salt=salt,                         n=N, r=R, p=P, maxmem=MAXMEM)    return salt + key def check_password(password: str, stored: bytes) -> bool:    salt, key = stored[:16], stored[16:]    new = hashlib.scrypt(password.encode(), salt=salt,                         n=N, r=R, p=P, maxmem=MAXMEM)    # constant-time comparison    return secrets.compare_digest(new, key)

secrets.compare_digest compares in constant time and reduces the risk of timing attacks. In the example the scrypt parameters are constants. To raise them over time, store the parameters next to the hash and recompute the hash with the new parameters the next time the user logs in.

Tokens and random values

Password reset tokens, keys, session identifiers and CSRF tokens need a cryptographically secure generator (CSPRNG). The random module is not suitable for this: its values can be predicted.

pythoncorrect
import secrets # 32 random bytes, URL-safetoken = secrets.token_urlsafe(32)

How to protect yourself

  • Classify data: which of it is sensitive by law, regulation or for the business.
  • Do not store more than you need: what is not stored cannot be stolen. For card numbers, use PCI DSS tokenisation or truncation.
  • Encrypt sensitive data at rest and all data in transit.
  • Use proven implementations of algorithms, not your own.
  • Use authenticated encryption, not encryption alone.
  • Disable caching of responses that contain sensitive data, in the CDN, the web server and the application cache.
  • Prepare for post-quantum cryptography: high-risk systems must be protected by the end of 2030 at the latest.

Related CWEs

CWEWhat it is
CWE-319Cleartext Transmission of Sensitive Information: sensitive data is sent in the clear
CWE-321Use of Hard-coded Cryptographic Key: the encryption key is embedded in the code
CWE-327Use of a Broken or Risky Cryptographic Algorithm: a broken or risky algorithm
CWE-338Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG): a weak random number generator
CWE-759Use of a One-Way Hash without a Salt: a hash without a salt
CWE-916Use of Password Hash With Insufficient Computational Effort: a password hash that is too fast

Server-side TLS settings and working with certificates are covered in the reference “TLS and PKI”.

Section sources

the section is written from these pages

A05:2025 Injection

Injection happens when untrusted data reaches an interpreter (a database, an OS shell, a browser) and the interpreter executes part of it as a command. There is one defence for every kind: keep data separate from commands and queries.

The category dropped from 3rd to 5th place, but every application in the data was tested for injection, and it ranks first by CVE count; it has 37 CWEs. It includes cross-site scripting (XSS) and SQL injection. XSS has more than 30,000 CVEs: it is common but usually does less damage. SQL injection has more than 14,000 CVEs: it is rarer but does more damage. Injection into language model prompts is covered separately by OWASP, in the OWASP LLM Top 10 (LLM01:2025 Prompt Injection).

Signs of vulnerability

  • User input is not validated, filtered or sanitised.
  • Dynamic queries and calls without parameters and without context-aware escaping go straight to the interpreter.
  • Unsanitised data ends up in ORM search parameters and pulls out extra records.
  • Input is concatenated into an SQL string, a command or a stored procedure.

Common kinds are injection into SQL, NoSQL, OS commands, ORM queries and LDAP, and expression languages (EL, OGNL); the mechanism is the same for all of them. They are found by code review together with automated testing of all inputs (parameters, headers, URLs, cookies, JSON, SOAP and XML), including fuzzing.

SQL: string concatenation and a parameter

With concatenation, the input becomes part of the SQL text. The quote in the string ' OR '1'='1 closes the value, and the WHERE condition becomes true for every row. With a parameter, the database receives the query text and the value separately, and the same string remains an ordinary value that matches nothing.

pythonnot like this
# the input becomes part of the SQL textquery = f"SELECT * FROM accounts WHERE cust_id = '{cust_id}'"db.execute(query)
pythoncorrect
# the query text and the value are passed separatelydb.execute(    "SELECT * FROM accounts WHERE cust_id = ?",    (cust_id,),)

A parameter substitutes values only. Table and column names, ASC and DESC cannot be passed as a parameter: choose them from a list defined in code and reject everything else:

pythoncorrect
SORT = {"asc": "ASC", "desc": "DESC"} def list_orders(db, direction):    order = SORT.get(direction)    if order is None:        raise ValueError("unknown sort order")    # only the value from the dictionary reaches the text    return db.execute(        f"SELECT id, total FROM orders ORDER BY total {order}"    ).fetchall()

XSS: output into HTML

XSS is the same injection, only the interpreter is the browser. The template engines of modern frameworks escape output automatically; the vulnerability appears where this mechanism is bypassed: innerHTML, dangerouslySetInnerHTML in React, bypassSecurityTrustAs* in Angular.

javascriptnot like this
// the string is parsed as HTML, so tags in it will runcomment.innerHTML = text;
javascriptcorrect
// the string stays textcomment.textContent = text;

If you really need to output HTML from a user, sanitise it with a sanitiser library such as DOMPurify, and keep it up to date. Content Security Policy is an additional layer of defence, not the main one.

OS commands

It is best to avoid an external command altogether: a safe API, meaning a language or library function, does not invoke an interpreter at all. If you need a command, pass the program and each argument as a separate list element, and then subprocess does not start a shell. With shell=True, the string example.com; cat /etc/passwd would run the second command.

pythonnot like this
# the whole string goes to the shellsubprocess.run("nslookup " + domain, shell=True)
pythoncorrect
import reimport subprocess # host name: letters, digits, dots, hyphens; not starting with a hyphenif not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9.-]{0,252}", domain):    raise ValueError("bad domain")# argument list: no shell is startedsubprocess.run(["nslookup", domain], check=True)

Checking against an allowlist of characters stops a command option from being passed in place of a host name, for example a string that starts with a hyphen.

Related CWEs

CWEWhat it is
CWE-89SQL Injection: input changes the meaning of an SQL query
CWE-79Cross-site Scripting: input runs as a script on the page
CWE-78OS Command Injection: input ends up in an OS command
CWE-77Command Injection: input changes a command of any command interpreter
CWE-917Expression Language Injection: injection into an expression language
CWE-20Improper Input Validation: input is not validated

The SQL language and its queries are covered in the SQL reference.

Section sources

the section is written from these pages

A06:2025 Insecure design

Insecure design means that a project lacks the necessary protective measures or they were designed incorrectly. This is a design error, not an implementation error: perfect code will not fix it, because the necessary protection mechanism was never created.

The category appeared in 2021 and in 2025 dropped from 4th to 6th place: OWASP notes noticeable progress in threat modelling. It also covers business logic errors, where it is not defined which changes to the application’s state are unacceptable. The category has 39 CWEs.

Design or implementation

AspectInsecure designImplementation error
When it arisesWhen gathering requirements and designingWhen writing code
ExamplePassword recovery through a “secret question”An SQL query built from strings
How to fix itReplace the mechanismFix the code
How to find itThreat modelling, design reviewCode review, tests, scanners

A secure design can also contain implementation errors. But an insecure design cannot be saved by its implementation: it has no measures against specific attacks.

Examples from OWASP

  • Password recovery through “questions and answers”: someone other than the owner may know the answer. NIST 800-63b, ASVS and the Top 10 prohibit such questions; the mechanism has to be replaced, not improved.
  • A cinema offers a group discount with no deposit for up to 15 people. In a few requests an attacker books 600 seats in all the screens at once.
  • An online shop without bot protection: scalpers buy up graphics cards within seconds of their release and resell them at auctions.

Bad and good: a business rule

A limit checked only by the form in the browser does not protect anything: requests can be sent directly. The server checks the rule on every request, and not only for a single order but also in total over a period:

pythonnot like this
def book(user, show, seats):    # the 15-seat limit is checked only by the form    return bookings.create(user, show, seats)
pythoncorrect
MAX_PER_BOOKING = 15MAX_PER_DAY = 30 def book(user, show, seats):    if seats < 1:        raise ValueError("seats must be positive")    if seats > MAX_PER_BOOKING:        raise ValueError("group bookings need a deposit")    # daily total: a series of small orders does not get around the limit    if bookings.seats_today(user) + seats > MAX_PER_DAY:        raise PermissionError("daily booking limit reached")    return bookings.create(user, show, seats)

Check the limit and record the order in a single transaction. Otherwise parallel requests pass the check at the same time and together exceed the limit: this is a race condition (CWE-362).

Misuse cases

Next to each use case, write a misuse case. It describes an action performed out of order, many times in a row, in parallel or for a different outcome. Each case needs a design measure and a test that verifies it.

FeatureMisuseDesign measure
Group booking600 seats through a series of requestsA limit per order and per user over a period, a deposit
Password recoveryThe answer to the “secret question” is known to othersRemove the questions from recovery
Selling a scarce productBots buy up the batch within secondsAnti-bot rules, checking purchases made in the first seconds of a sale

Threat modelling

Threat modelling is a repeatable process for finding what can go wrong. It is carried out at the design stage and updated whenever data flows and permissions change. The process answers four questions:

  1. “What are we working on?” The system model: a data flow diagram with trust boundaries.
  2. “What can go wrong?” Threats, for example by STRIDE category.
  3. “What are we going to do about it?” For each threat: mitigate, eliminate, transfer or accept the risk.
  4. “Did we do a good enough job?” Review of the model and the measures taken by all participants.
STRIDE threatWhat it violatesExample
SpoofingAuthenticationA stolen user token
TamperingIntegrityAn unintended change to records in the database
RepudiationAccountabilityCleaned-up logs
Information disclosureConfidentialityA dump of accounts from the database
Denial of serviceAvailabilityLocking someone else’s account with failed logins
Elevation of privilegeAuthorisationA modified role in a JWT

How to protect yourself

  • Embed application security (AppSec) specialists in the development cycle from the first days of a project.
  • Build a library of proven secure design patterns and ready-made components (a paved road).
  • Model threats for critical parts: authentication, access control, business logic, key flows.
  • Write security requirements directly into user stories.
  • Add plausibility checks at every level, from the interface to the backend.
  • Write unit and integration tests that check how well critical flows withstand the threats from the model.
  • Separate the layers of the system and tenants throughout the architecture.

Related CWEs

CWEWhat it is
CWE-256Unprotected Storage of Credentials: credentials are stored without protection
CWE-269Improper Privilege Management: privileges are managed incorrectly
CWE-434Unrestricted Upload of File with Dangerous Type: files of a dangerous type can be uploaded
CWE-501Trust Boundary Violation: trusted and untrusted data are mixed
CWE-522Insufficiently Protected Credentials: credentials are not protected enough
CWE-841Improper Enforcement of Behavioral Workflow: process steps can be skipped or reordered

MITRE groups business logic errors under CWE-840: they are hard to find automatically, because the attack uses the application’s legitimate features.

Section sources

the section is written from these pages

A07:2025 Authentication failures

Authentication failures occur when a system takes an attacker for a legitimate user, through password guessing, weak passwords, a missing second factor or session flaws. The result is always the same: someone logs in to another person’s account.

The category stays in 7th place and has been renamed; in 2021 it was Identification and Authentication Failures. It covers 36 CWEs. OWASP notes that standard authentication frameworks seem to be reducing these flaws.

Signs of vulnerability

  • Automated attacks are not blocked: credential stuffing with username-password pairs from other breaches, brute force, and guessing variations of leaked passwords such as Winter2025 → Winter2026.
  • Default, weak and well-known passwords are allowed: admin with the password admin, Password1.
  • Registration lets users choose a password from known breaches.
  • Password recovery relies on “security questions”, which cannot be made secure.
  • Passwords are stored in plain text, encrypted, or under a weak hash.
  • There is no second factor (MFA), or it can be bypassed through a weak fallback.
  • The session identifier is visible in the URL or a hidden field and does not change after login.
  • Sessions and tokens are not invalidated on logout or after inactivity, and credentials are not checked for purpose and audience.

Bad and good: the session cookie

Accept the session identifier only from a cookie, never from a URL parameter, and issue a new one after login. Otherwise session fixation is possible: the attacker gives the victim their own identifier and uses it after the victim logs in.

httpDon’t do this
HTTP/1.1 302 FoundLocation: /account?sessionid=7c4f1a9e2b6d8035Set-Cookie: sessionid=7c4f1a9e2b6d8035; Path=/
httpDo this
HTTP/1.1 302 FoundLocation: /accountSet-Cookie: __Host-SessionID=Qm9zTk1R; Secure; HttpOnly; SameSite=Strict; Path=/

The __Host- prefix requires Secure and Path=/ and forbids Domain; HttpOnly hides the cookie from JavaScript; SameSite=Strict stops it being sent with requests from other sites. Let the framework’s built-in session manager generate the identifier itself: it needs at least 64 bits of entropy from a cryptographically secure generator, and the value in the example is shortened.

Logging in without hints for the attacker

Respond identically whether or not the user exists, the password is correct or the account is locked; otherwise attackers use the responses to enumerate valid usernames. The response time must match too (compute the password hash in both cases), and so must the HTTP status code.

SituationDon’t do thisDo this
Login“Wrong password for user foo”“Incorrect username or password”
Password recovery“That address is not in our database”“If the address is in our database, we will send a password reset link to it”
Registration“That username is already taken”“An activation link has been sent to the address you provided”

How to protect yourself

  • Enable MFA wherever possible, and make it mandatory for administrators. SMS is a limited option because of SS7 interception and SIM swapping; for finance and personal data, use TOTP, push notifications or WebAuthn and FIDO2.
  • Do not ship the system with default credentials, especially for administrators.
  • Check new and changed passwords against lists of leaked passwords and against the 10,000 worst passwords.
  • Set password length according to NIST SP 800-63B: without MFA a password shorter than 15 characters is weak, with MFA shorter than 8; the maximum should be at least 64 characters. Do not impose composition rules such as capital letters, digits or special characters.
  • Do not require periodic password changes; if you suspect a leak, reset the password immediately.
  • Limit or slow down failed login attempts without creating a denial of service. Count attempts per account, not per IP address.
  • Issue a new random session identifier after login, and invalidate the session on the server after logout, inactivity and an absolute timeout.
  • For JWTs, check aud, iss and scopes.

Related CWEs

CWEWhat it is
CWE-287Improper Authentication: identity is not properly verified
CWE-307Improper Restriction of Excessive Authentication Attempts: guessing is not limited
CWE-384Session Fixation: the session does not change after login
CWE-521Weak Password Requirements
CWE-640Weak Password Recovery Mechanism for Forgotten Password
CWE-798Use of Hard-coded Credentials: credentials are embedded in code

The OAuth 2.0 and OpenID Connect protocols are covered in the “OAuth and OIDC” reference.

Section sources

the section is written from these pages

A08:2025 Software or data integrity failures

Software or data integrity failures occur when an application trusts code or data without verifying its source and that it has not been altered. Examples: an update without a signature, a plugin from an unverified source, a serialised object taken from a request.

The category stays in 8th place; in the name, “and” was replaced by “or”. It differs from A03 in level: it is about verifying the integrity of specific artefacts, code and data at trust boundaries. The category has 14 CWEs.

Where it happens

  • Plugins, libraries and modules from unverified sources, repositories and CDNs.
  • A CI/CD pipeline pulls code and artefacts from untrusted places and does not verify their signatures.
  • Auto-update downloads and installs updates without an integrity check, as many routers and device firmware images do.
  • Objects are serialised into a structure that the client can see and modify.
  • A company subdomain points to a contractor’s service, which then receives all cookies of the main domain, including login cookies.

Bad and good: state in a cookie

Native deserialisation restores objects together with their behaviour, so attacker-controlled data turns into code execution. In Python, pickle.loads() must never be used on untrusted data; in Java, such a format shows up as the string rO0 in base64, which is how attackers find the entry point.

pythonDon’t do this
import base64import pickle # deserialising client data runs its codestate = pickle.loads(base64.b64decode(cookie))

Pass plain data (JSON) and sign it if the client sends it back. The signature is verified before parsing, and a modified value is rejected:

pythonDo this
import base64import hmacimport jsonimport os KEY = os.environ["STATE_KEY"].encode() def sign(body: str) -> str:    return hmac.new(KEY, body.encode(), "sha256").hexdigest() def dump_state(state: dict) -> str:    raw = json.dumps(state, separators=(",", ":")).encode()    # base64url: no quotes, commas or spaces in the value    body = base64.urlsafe_b64encode(raw).decode()    return f"{sign(body)}.{body}" def load_state(token: str) -> dict:    sig, _, body = token.partition(".")    # check the signature first, with a constant-time comparison    if not hmac.compare_digest(sig.encode(), sign(body).encode()):        raise ValueError("state was tampered with")    return json.loads(base64.urlsafe_b64decode(body))

For YAML from an untrusted source, use only yaml.safe_load(): yaml.load() with Loader=yaml.UnsafeLoader creates arbitrary Python objects.

Scripts from third-party CDNs

The integrity attribute (Subresource Integrity) holds the hash of a file. The browser checks the downloaded file against the hash before running it, so a script tampered with on the CDN will not execute. To compute the hash:

bashOn your machine
openssl dgst -sha256 -binary lib.js | openssl base64 -A
htmlindex.html
<script src="https://cdn.example.com/lib.js"  integrity="sha256-qznLcsROx4GACP2dm0UCKCzCG+HiZ1guq6ZZDob/Tng="  crossorigin="anonymous"></script>

Subresource Integrity requires CORS: a file from another origin needs the crossorigin attribute, and the CDN must allow such requests. The hash changes with every version of the file, so pin a specific library version rather than “latest”.

How to protect yourself

  • Verify the digital signatures of software and data to confirm the source and that nothing has been altered.
  • Take npm, Maven and other ecosystem dependencies only from trusted repositories; for high-risk systems, use an internal vetted mirror.
  • Require signed commits before merging, and verify packages against hashes on installation.
  • Review code and configuration changes before they reach the pipeline.
  • Separate permissions in CI/CD so that code cannot be swapped on the way through build and release.
  • Do not accept unsigned or unencrypted serialised data from clients without an integrity check.

Related CWEs

CWEWhat it is
CWE-502Deserialization of Untrusted Data
CWE-494Download of Code Without Integrity Check
CWE-345Insufficient Verification of Data Authenticity
CWE-829Inclusion of Functionality from Untrusted Control Sphere
CWE-830Inclusion of Web Functionality from an Untrusted Source: a script or widget from a third-party origin
CWE-915Improperly Controlled Modification of Dynamically-Determined Object Attributes: mass assignment of object fields

Compromised dependencies and the supply chain as a whole are covered in “A03:2025 Software supply chain failures”.

Section sources

the section is written from these pages

A09:2025 Security logging and alerting failures

Security logging and alerting failures occur when security events are not logged, nobody looks at the logs, or alerts do not fire. Without a log an attack cannot be detected, and without an alert there is no time to respond to it.

The category is in 9th place. In 2025 “monitoring” in the name was replaced by “alerting”: a good log without alerts is almost useless. It barely shows up in testing data (only 723 CVEs), and it made the list for the third time thanks to the community survey. The category has 5 CWEs.

Signs of a problem

  • Logins, failed logins and major operations are not logged or are logged inconsistently, for example only successful logins.
  • Warnings and errors leave no clear records.
  • Logs are not protected against tampering and are stored only locally, with no backups.
  • Penetration tests and DAST scans (Burp, ZAP) trigger no alerts at all.
  • There are no alert thresholds or escalation procedure, and so many false positives that the important alerts get lost.
  • Personal data, passwords or tokens end up in the log, and the records themselves are visible to the user.

What to log

Every record answers the questions “when, where, who and what”. Always log the events in the table; OWASP has a common vocabulary of names for them, which you can use to configure alerts:

EventOWASP vocabulary name
Successful and failed loginauthn_login_success, authn_login_fail
Lockout after failed attemptsauthn_login_lock
Access deniedauthz_fail
Change of user permissionsauthz_change
Any administrator actionauthz_admin
Input validation failureinput_validation_fail
Session creation, renewal and expirysession_created, session_renewed, session_expired

Do not log passwords, access tokens, encryption keys, database connection strings, payment card data or sensitive personal data. If you need the session identifier for an investigation, log its hash instead.

Bad and good: the record format

In a text log, newline characters (CR and LF) from input create forged records. This is log injection. If a username is aliya followed by a newline and the text of a fake record, the log will contain a false message about a successful login:

textDon’t do this
2026-10-31 09:15:02 WARN login failed for aliya2026-10-31 09:15:02 INFO login success for admin

Write structured records, for example JSON, with a fixed set of fields and a time in ISO 8601 with a UTC offset, and limit the length of values taken from input:

jsonDo this
{  "datetime": "2026-10-31T09:15:02+05:00",  "appid": "shop.auth",  "event": "authn_login_fail:aliya",  "level": "WARN",  "description": "User aliya login failed",  "source_ip": "203.0.113.24",  "request_uri": "/api/v1/login",  "request_method": "POST"}

In Java, do not build the message template by concatenation: if the input contains {}, the logger will substitute another argument there. Parameters protect the template, but not against CR and LF, so you also need a structured output format, such as JsonTemplateLayout in Log4j.

javaDon’t do this
log.warn("Login failed for " + username + " from {}", ip);
javaDo this
log.warn("Login failed for {} from {}", username, ip);

How to protect yourself

  • Log all failed logins, access denials and server-side input validation errors with user details, and keep them long enough for an investigation.
  • Log every protection mechanism, both on success and on failure.
  • Protect the transaction audit log from modification and deletion, for example with an append-only table.
  • Set up alerts with use cases and response playbooks for the on-call team.
  • Plant honeytokens, which are decoy records or accounts: any access to them almost never produces a false positive.
  • Prepare an incident response plan, for example based on NIST SP 800-61r2 or later.

Related CWEs

The category has 5 CWEs:

CWEWhat it is
CWE-778Insufficient Logging: important events are not recorded
CWE-117Improper Output Neutralization for Logs: input forges log records
CWE-532Insertion of Sensitive Information into Log File: secrets end up in the log
CWE-223Omission of Security-relevant Information: the record lacks data that matters for security
CWE-221Information Loss or Omission: information is lost or not recorded

Metrics and alerting rules are covered in the “Prometheus and Grafana” reference; OS logs are covered in the Linux and systemd references.

Section sources

the section is written from these pages

A10:2025 Mishandling of exceptional conditions

Mishandling of exceptional conditions occurs when a program fails to prevent, detect or properly handle a failure: a dropped network connection, a lack of memory or permissions, an exception. The system ends up in an unpredictable state, from a crash to bypassed checks.

This is a new category in the 2025 edition, with 24 CWEs. Some of them used to be filed under “low code quality”; OWASP separated them out to give specific recommendations.

Where failures come from

An application goes wrong at one of three steps: it fails to prevent an unusual situation, fails to notice it when it happens, or reacts badly afterwards. Typical causes:

  • Incomplete input validation.
  • Error handling far from where the errors arise, at the top level instead of in the function.
  • An unexpected state of the environment: lack of memory or permissions, network failure.
  • Inconsistent exception handling, or none at all.

Failing open

Failing open means a failure after which the check is treated as passed. For example, the code catches any exception from a permission check and allows the action:

pythonDon’t do this
def can_edit(user, doc):    try:        return policy.allows(user, "edit", doc)    except Exception:        # a failed check lets the request through        return True
pythonDo this
def can_edit(user, doc):    try:        return policy.allows(user, "edit", doc)    except PolicyError:        log.exception("policy check failed")        # on failure, deny access        return False

A transaction is all or nothing

If an operation made of several steps is interrupted in the middle, roll it back entirely; this is failing closed. OWASP’s example: a debit from an account, a credit and a log entry. The attacker drops the connection after the debit, and without a rollback they can drain the account or send a transfer several times. A Python sqlite3 connection used as a context manager with the default settings does a commit by itself if the block finished without exceptions, and a rollback if not:

pythonDo this
def transfer(con, src, dst, amount):    # if an exception occurs, with rolls back both updates    with con:        con.execute(            "UPDATE accounts SET balance = balance - ? WHERE id = ?",            (amount, src),        )        con.execute(            "UPDATE accounts SET balance = balance + ? WHERE id = ?",            (amount, dst),        )

A global error handler

The client gets a generic response without details; the log gets everything needed for an investigation. This is what a response that helps an attacker looks like: the Tomcat and Struts versions and a stack trace are visible.

textDon’t do this
HTTP Status 500 - For input string: "null"...java.lang.NumberFormatException: For input string: "null"    java.lang.Integer.parseInt(Integer.java:492)    com.opensymphony.xwork2.DefaultActionInvocation.invoke(...)    ...note: The full stack trace of the root cause is availablein the Apache Tomcat/7.0.56 logs.

In Spring, a single class with @RestControllerAdvice catches all unhandled exceptions, logs them and returns a generic response to the client in the Problem Details format (the ProblemDetail class):

javaDo this
@RestControllerAdvicepublic class GlobalErrorHandler        extends ResponseEntityExceptionHandler {     private static final Logger log =            LoggerFactory.getLogger(GlobalErrorHandler.class);     @ExceptionHandler(Exception.class)    public ProblemDetail handle(Exception exception) {        // details go to the log; the client gets a generic response        log.error("Unhandled exception", exception);        return ProblemDetail.forStatusAndDetail(                HttpStatus.INTERNAL_SERVER_ERROR,                "An error occurred, please retry");    }}

How to protect yourself

  • Catch errors where they occur and handle them meaningfully; a global handler is a safety net for anything missed.
  • Handle errors in one place and in the same way throughout the application, ideally throughout the organisation.
  • If a failure occurs in the middle of a transaction, roll it back entirely.
  • Set rate limits, quotas and timeouts: nothing in the system should be unlimited.
  • Release resources on errors too: an exception during a file upload that leaves a resource held will exhaust resources on retries, which is a denial of service.
  • Watch for recurring errors: a series of identical failures often means an attack on error handling.

Related CWEs

CWEWhat it is
CWE-636Not Failing Securely ('Failing Open'): on failure the system moves to a less protected state
CWE-755Improper Handling of Exceptional Conditions
CWE-209Generation of Error Message Containing Sensitive Information: the error message reveals data
CWE-248Uncaught Exception
CWE-252Unchecked Return Value: the result of a call is not checked
CWE-476NULL Pointer Dereference

Section sources

the section is written from these pages

Standards and their status

The current edition is OWASP Top 10:2025, the eighth in the series; it replaced the 2021 edition. The project’s main address points to the current edition, while each edition has its own permanent address. Link to the permanent address and state the edition year: category codes change between editions.

DocumentWhat it definesStatusReplaced or complemented by
OWASP Top 10:202510 categories of web application risks, 248 CWEsCurrent edition—
OWASP Top 10:2021The previous edition: it introduced Insecure Design, Software and Data Integrity Failures and SSRFReplacedTop 10:2025
OWASP Top 10:2017An edition with separate XXE, Insecure Deserialization and XSS categoriesReplacedTop 10:2021, then Top 10:2025
OWASP ASVS 5.0.0Verifiable security requirements for web applications and servicesStable release of 30 May 2025Complements the Top 10 with requirements for verification
CWE-1450Mapping of Top 10:2025 categories to CWE weaknesses: categories CWE-1436 to CWE-1445Based on release candidate RC1 of 6 November 2025, CWE 4.19—

What changed in the 2025 edition

  • Two new categories and one merger: SSRF moved into A01, A03 Software Supply Chain Failures expanded A06:2021, and A10 Mishandling of Exceptional Conditions is new.
  • Security misconfiguration rose from 5th place to 2nd; A07, A08 and A09 have clearer names, and their positions are unchanged.
  • Data was collected without limiting the list of CWEs: the analysis covers 589 CWEs, against almost 400 in 2021 and about 30 in 2017.
  • A category includes at most 40 CWEs, 25 on average.
  • The methodology is unchanged: 8 categories come from data, 2 from a community survey. CVSS v4.0 is not yet used in the calculation: its formula does not give separate scores for exploitability and impact.

Outdated categories that are still cited

Old nameWhere it is now
A3:2017 Sensitive Data ExposureCryptographic Failures since 2021, now A04:2025
A4:2017 XML External Entities (XXE)Part of Security Misconfiguration since 2021, now A02:2025
A8:2017 Insecure DeserializationPart of Software and Data Integrity Failures since 2021, now A08:2025
Cross-Site Scripting (XSS) as a separate category, 2017Part of Injection since 2021, now A05:2025
A10:2017 Insufficient Logging & MonitoringA09:2021, now A09:2025 Security Logging and Alerting Failures
A2:2017 Broken AuthenticationA07:2021 Identification and Authentication Failures, now A07:2025
A06:2021 Vulnerable and Outdated ComponentsExpanded into A03:2025 Software Supply Chain Failures
A10:2021 Server-Side Request Forgery (SSRF)Part of A01:2025 Broken Access Control

The CWE-1450 view on the MITRE site is still based on release candidate RC1. To map CWEs to categories, check the “List of Mapped CWEs” on the risk’s page.

Section sources

the section is written from these pages

End of the reference

What changed

revision history · 3 entries

Every edit is saved as a revision: a snapshot of the reference, the reason and a summary of changes. The published version changes only after the same checks as at creation.

  1. Manual edit

    reason: manual edit
  2. Manual edit

    reason: manual edit
  3. Reference updated

Weekly check

How the reference is checked

Once a week — and right after news of a release or a vulnerability — the reference is checked in three steps.

  1. 1. Freshness

    Sections are compared with the release notes and changelogs from the official sources and with the topic’s news.

  2. 2. Errors

    Every section is read again: wrong facts, outdated APIs and flags, broken examples.

  3. 3. Links — by an HTTP request

    Every source link must respond. A broken link is a reason to recheck the section.

No findings — only the date changes. Findings — only the affected sections are rewritten, and they appear in “What changed”. A new version replaces the published one only after passing the same checks as at creation.

Statuses

Verified
no findings
Updated
sections rewritten, edits are listed
Rechecking
while the check runs, the previous version stays open
Needs review
disputed points: the verified version is shown, editors review

Last check

10 Nov · Check · updated · no findings

Found an error in the reference?

On the topic

tracks, news and other references
The whole “OWASP Top 10” topic
11 sections
Another reference · Cybersecurity

TLS and PKI

Verified 6 Nov
All references · 61