The CWE Program's 2025 Top 25 ranks cross-site scripting (CWE-79) first, SQL injection (CWE-89) second, cross-site request forgery (CWE-352) third and missing authorization (CWE-862) fourth. 2025 CWE Top 25 A ranked weakness list is useful for prioritization, but it is not a ready-made penetration-test scope. This original matrix translates common entries into test methods and evidence limits for a web or API buyer.
Quick answer. Use the CWE Top 25 to ask whether the test plan covers weakness classes relevant to your architecture. Require the tester to state which classes were exercised dynamically, which need source or binary review, and which are not applicable. Stingrai can scope human-led application testing around the relevant classes and report observed coverage rather than imply that one pentest covered the entire Top 25.
Read the ranking correctly
The CWE methodology combines weakness frequency and severity in a danger score drawn from published vulnerability data. It is not the probability that a particular application contains a weakness, and it is not a vendor test ranking. A memory safety entry may be highly relevant to a native parser but less relevant to a web-only application written in a memory-safe runtime. The buyer should select based on its components and trust boundaries.
2025 rank and class | Web/API test opportunity | Evidence to request | Key limit |
|---|---|---|---|
1, CWE-79 cross-site scripting | Test user-controlled display paths in their browser context | Input, output context and safe execution proof | Does not cover every template or client-side sink |
2, CWE-89 SQL injection | Test selected database-backed inputs and review query construction | Sanitized result plus code or query evidence where available | A negative probe does not prove all queries safe |
3, CWE-352 CSRF | Test sensitive browser actions across origin boundaries | Action, victim session context and control result | API-only token flows may need a different threat model |
4, CWE-862 missing authorization | Compare restricted and permitted actors on the same action | Actor, object, policy and observed result | Requires business owner to define allowed behavior |
5, CWE-787 out-of-bounds write | Assess native parsers and unsafe-language components | Fuzzing or code-review result, crash analysis when safe | Usually not resolved by a standard web-only black-box test |
6, CWE-22 path traversal | Test selected file path inputs in approved test storage | Normalized path, boundary and safe result | Avoid reaching unrelated files or environments |
7, CWE-416 use after free | Assess native lifetime management in relevant components | Source, binary or fuzzing evidence | Cannot be inferred from an ordinary HTTP checklist |
9, CWE-78 OS command injection | Test selected command-bearing paths safely | Controlled command boundary and sanitized output | Requires knowledge of actual command invocation paths |
10, CWE-94 code injection | Review dynamic code evaluation and related inputs | Code path or controlled behavior | Do not equate every template issue with CWE-94 |

Figure 1: A CWE entry becomes useful only after it is tied to an application component, test method, observed evidence and coverage limit. This is an editorial mapping, not a CWE Program statement. Source: CWE Program, 2025 Top 25.
The ranks and names above come from the CWE Program's 2025 table; the testing judgments are Stingrai's editorial interpretation for scoping. We deliberately leave rank 8, CWE-125 out of the compact table because an out-of-bounds read calls for similar native-code context to the memory safety rows. Omission from a short matrix is not a claim that the weakness is unimportant. The full Top 25 should be reviewed against the buyer's technology inventory.
What the ranking measures
The CWE Program's methodology describes 39,080 CVE Records for vulnerabilities published from June 1, 2024 to June 1, 2025. The program reviewed weakness mappings and combined normalized frequency with average severity to calculate the list. Those are observations about a published vulnerability dataset. They are not a measurement of weaknesses in a buyer's codebase, the quality of a particular pentest firm, or the likelihood that a future assessment will find a given class.
This distinction changes how a procurement team should use rank. A class near the top deserves consideration, but applicability comes first. A customer-facing browser feature may make output handling and cross-site request forgery important. A server-side API with no browser session has a different exposure. A native document converter can carry memory safety risk even though the buyer experiences it through an ordinary upload endpoint. Ask the engineering owner for the software components and trust boundaries before asking a testing firm to promise coverage.
The Top 25 also combines multiple kinds of weakness. Some entries describe an observable failure at an application boundary. Others concern how a program handles memory internally. A web application test, a source-assisted review, and a native-code assessment produce different evidence. A buyer should purchase the method that can answer the question, not simply the report that contains the most CWE labels. This is why the matrix below treats "not applicable" and "needs another method" as useful outcomes when they are justified.
Translate the leading classes into testable questions
Browser output and action boundaries
For CWE-79, ask where untrusted content enters a page and in which browser context it is displayed. A credible result names the input path, the output context, the affected role and the observed behavior. It also states which templates, rich-text features and client-side sinks were excluded. A tester may demonstrate a failure in one path, while the product team still needs to review shared rendering components and regression coverage. A single clean page does not establish that every output context is safe.
For CWE-352, the question is whether a browser can be induced to perform a sensitive state-changing action outside the intended user flow. The buyer should identify actions such as changing account access, approving a workflow or altering a payment destination, using synthetic accounts. The report should state the session model, the action tested and the control observed. A token-based API called only by a non-browser service may have a different threat model; copying a browser checklist into that scope adds little evidence.
For CWE-89, ask which product paths construct database queries from external input and whether the proposed method can inspect query construction. A dynamic test can confirm a weakness on a selected path. Source access can show whether a shared data-access layer enforces separation between data and query structure. Where source is unavailable, the report should explicitly limit its conclusion to observed behavior. It should not convert a set of negative probes into a claim that every query is safe.
Authorization policy and tenant boundaries
CWE-862 is missing authorization: an actor reaches a resource or action without a required check. Its value to a buyer is that it forces a policy question. Who is meant to perform this action on this object, under which relationship and at what stage of a workflow? A tester cannot infer all of those rules from an API description. Give the tester synthetic users, roles, tenants and objects with the expected access decisions written down. Then require both an allowed case and a denied case for the same operation.
The evidence should distinguish a missing check from a check that exists but implements the wrong policy. The CWE list also contains CWE-863, Incorrect Authorization, which can fit the latter pattern. This distinction matters for remediation: a missing enforcement point may call for a shared policy gate, while an incorrect decision may call for a policy or relationship correction. The report can state a provisional CWE and refine it when the product owner confirms the intended rule. The actor-object trace is more useful than the label alone.
Native processing and command boundaries
CWE-787, CWE-416 and CWE-125 should prompt an inventory of native parsers, libraries, agents and file processors. A web endpoint can pass data into a native component without revealing the internal failure through a routine HTTP test. Ask whether the engagement includes safe fuzzing, instrumentation, code review or binary analysis for the relevant component. If it does not, the proposal should say so plainly. The evidence may be a controlled crash analysis, a source-level defect and fix, or a coverage report from a specialist method, rather than a standard web finding.
CWE-22, CWE-78 and CWE-94 each involve a boundary between user-controlled data and a privileged interpreter or path decision, but they are not interchangeable. The buyer should ask which file operations, command invocations and code-generation features actually exist. The test plan should use approved, non-destructive proof in a controlled environment and record what boundary was crossed. If the product has no such feature, a documented non-applicability decision is more honest than a generic statement that all three classes were tested.
Separate dynamic proof from code-level assurance
A dynamic test can show that one input, identity or workflow produced an unexpected result. It cannot prove the absence of the same class across every code path. This distinction is sharp for injection and authorization. If a selected query rejects a malicious input, the tester can report that observed behavior for that path. If the buyer needs a statement about all database queries, source-assisted review and broader automated testing are needed. The proposal should name that broader work.
For missing authorization, a scanner may not know which actor is meant to see a record. The buyer should provide two synthetic identities and records with an explicit owner or tenant boundary. The tester then compares the same action across identities. A confirmed failure can be tagged to the appropriate CWE, but the CWE label is the summary; the actor-object proof is the useful evidence. This is why authorization testing often requires more business context than a generic vulnerability list suggests.
Memory safety weaknesses in the Top 25 call for different methods. A native image parser, agent or library may require fuzzing, instrumentation, code review or binary analysis. A web-facing API may invoke that native component indirectly, but a standard HTTP test does not automatically cover its internal memory behavior. Procurement should ask whether such components exist and whether the vendor's staffing and method cover them. If not, record them as exclusions and buy the correct specialist work separately.
Build a coverage matrix for your application
List components first: browser UI, public API, partner API, file processor, background job, native library and administrative service. For each component, note languages and runtimes, trust boundary, data sensitivity and high-impact operations. Then select CWE classes that apply. A buyer can add the rank as context, but should not choose a test solely because an entry appears near the top of a generic list. The CWE methodology explains how the Top 25 is constructed; it does not prescribe a product-specific penetration-test methodology.
For each selected class, require one of four coverage statuses: tested with positive and negative evidence, reviewed through source or configuration, not applicable with a reason, or not tested with a reason. Do not use "covered" without a method. A finding should include the affected component, CWE, controlled proof, business impact and recommended remediation. A retest should repeat the failing case and record whether the broader weakness class was searched elsewhere.
This matrix is most useful during vendor selection. Give bidders the same architecture and ask them to mark which classes they can test dynamically, which require code or specialist analysis, how they will handle safe proof, and what they will exclude. The difference between proposals becomes visible in evidence depth, not in the number of weakness acronyms copied into a PDF.
A reusable buyer worksheet
Use one row per component and weakness class. This is a request template, not a claim that the CWE Program prescribes these fields. A security lead can copy it into a statement of work or a vendor question sheet, then replace the example with the actual product architecture.
Field | Buyer input or required vendor answer |
|---|---|
Component and version | Name the deployed feature, build, environment and owner |
Relevant CWE and reason | State which trust boundary makes the class applicable; cite the 2025 list for official rank and label |
Actor and data setup | Identify synthetic roles, tenants, objects and allowed relationships |
Method | Dynamic black-box, authenticated grey-box, source-assisted or specialist analysis |
Positive and negative cases | State permitted behavior and prohibited behavior before the test |
Evidence delivered | Case identifier, observed result, safe proof, limitation and remediation owner |
Coverage status | Tested, source-reviewed, not applicable with reason, or not tested with reason |
Follow-up | Fix owner, regression case, retest result and any broader class search |
A completed authorization row might describe a partner API that returns order objects for several tenants. The buyer supplies synthetic tenant accounts, owned objects and cross-tenant objects. The tester states the expected allow and deny decisions, tests those relationships and records the observed result for each. If a cross-tenant access failure is confirmed, the report ties it to the affected authorization decision and a fix owner. If all sampled cases behave as expected, the result says exactly which operations, roles and objects were sampled. It does not say the entire API is free of authorization weaknesses.
For an upload processor, the worksheet may instead identify the native library that receives a file after the web tier. A vendor that only tests HTTP workflows should mark memory safety analysis outside its method. That answer can still be useful: it tells the buyer what separate specialist work to buy and avoids a false assurance gap. The same logic applies when a test environment cannot reproduce a production integration. Name the missing integration and state which conclusions remain uncertain.
Evaluate the proposal before purchasing
Request a sample coverage row, not merely a sample report cover. The row should show how a tester links an application feature to an expected security decision, the chosen method, observed evidence and a stated limit. Ask who will define business rules. If the proposal says "all OWASP and CWE issues covered" without component inventory, test roles or exclusions, the claim is too broad to use as an acceptance criterion.
Confirm how the testing team will handle access. A black-box test may reveal externally observable failures, but an authenticated grey-box test can compare role and tenant decisions. Source-assisted work can inspect query construction and shared authorization code. Specialist memory work requires different tools and skills. Those methods may be combined, but the statement of work should say which method applies to which component. A buyer should also define safe stopping conditions for upload, parser and command-bearing features so the evidence does not depend on destructive behavior.
Use the same worksheet across bidders. One vendor may offer broad dynamic sampling; another may offer narrower source-assisted analysis. Neither is automatically better. Compare the proposed cases against the product's highest-impact boundaries, the quality of proof, the way limitations are reported and whether retests are included. Ask the vendor to state which deliverables are included in the quoted scope and which would require a change order. This turns a loose weakness-list promise into an auditable purchasing decision.
Prioritize when the assessment window is limited
An enterprise buyer may have more product surfaces than a single engagement can examine. In that case, prioritize by the consequences of a boundary failing, the exposure of the component, the availability of realistic test accounts and the method needed to produce reliable evidence. These are procurement choices, not a ranking derived from the CWE dataset. Document why each high-impact component was included or deferred. An excluded parser that requires specialist fuzzing is different from an excluded browser feature that could have been tested with existing accounts.
Start with an architecture walk-through with the product owner. Mark where customer data, administrative authority, file processing and external integrations cross a trust boundary. Then ask the testing firm which of those boundaries can be assessed in the agreed environment. If the test environment lacks production-like tenant relationships, prioritize creating synthetic relationships before scheduling an authorization assessment. If a native component is in scope, confirm that the testers have the right method and safe stopping conditions. This ordering improves the usefulness of the test without pretending that the Top 25 provides a product-specific risk score.
Preserve deferred work in a backlog with its reason, owner and proposed next method. A report that covers the agreed boundary well and names its omissions gives the buyer a better plan than a report that declares a whole weakness list complete. At renewal, revisit deferred rows when new components, user roles or deployment models appear. This turns the matrix into a living record of assurance decisions rather than a static annual attachment.
Accept the report by evidence, not by label count
At delivery, inspect the coverage status for every agreed row. "Tested" should identify the build, account roles, case and observed result. "Reviewed" should name the source, design or configuration examined and the reviewer conclusion. "Not applicable" should explain which missing feature or trust boundary makes the class irrelevant. "Not tested" should give the actual blocker, such as absent credentials, an unstable environment or a missing specialist method. A blank row is not a defensible exclusion.
For confirmed findings, require a controlled proof and a remediation decision. A severity label and CWE identifier alone do not tell an engineer what failed. The useful record ties the behavior to the affected component, expected control, observed deviation and business impact. For a negative result, ask what was sampled and what was not. Negative evidence is still valuable when it is bounded; it becomes misleading when the report turns it into a universal claim.
After remediation, retest the original failing case on the fixed build. Then ask whether the same root cause appears in a shared component or in similar workflows. This broader search belongs to the product team's prevention work and may require additional review beyond the original pentest. Preserve both the retest result and the remaining uncertainty. That makes the CWE matrix useful at the next release, rather than a one-time checklist that disappears with the final PDF.
What this means for defenders
The CWE list can help prioritize recurring engineering prevention work after an assessment. A series of CWE-862 findings may signal a missing authorization design pattern rather than isolated endpoint mistakes. Repeated CWE-79 findings may point to inconsistent output handling. Root-cause analysis and regression tests are then more valuable than retesting only the individual URL. These are reasoned program recommendations, not measurements from the Top 25 dataset.
Stingrai's web application testing can be scoped to selected application and API components. Its cloud testing can address relevant infrastructure trust edges. The report should tell the buyer which CWE classes were observed, which were sampled and which need a different method. One-time and continuous assessments can be used according to release cadence, with retests of confirmed findings.
Method and citation
This article uses the CWE Program's 2025 list and methodology, read on 15 October 2026. The rank and class names are source facts; the coverage judgments and examples are an original editorial framework. We did not measure the prevalence of these weaknesses in Stingrai engagements or in any customer environment. Cite this page for the mapping, and cite the CWE Program directly for official ranks or danger scores.
Frequently Asked Questions
Does a pentest cover all 25 CWEs on the 2025 list?
No. Coverage depends on the application's components and the test method. Some entries need native-code review or fuzzing, and some are not applicable to a given product. Require explicit statuses and exclusions.
Which 2025 CWE Top 25 entry is relevant to API authorization testing?
CWE-862, missing authorization, is directly relevant when an API may allow an identity to perform an action it should not. The buyer still needs to define the intended actor-object policy before a tester can prove a failure.
Is the CWE Top 25 a product-specific risk score?
No. It is a ranking derived from published vulnerability data using the CWE Program's methodology. Use the list as a prompt to examine relevant classes, not as a probability estimate for a particular application.
What should a buyer ask a pentest vendor to report?
Ask for component-level CWE applicability, test method, observed evidence, exclusions, confirmed findings with business impact and a retest of failed cases. The CWE label alone is insufficient.
Related reading
Talk to Stingrai
Share the architecture and the weakness classes you need assessed. Get a Quote or book a free discovery call.


