Security Standards

What is the SANS CWE Top 25?

The CWE Top 25 Most Dangerous Software Weaknesses is an annual ranking of the most prevalent and impactful software weakness types, used to prioritize secure coding and vulnerability management efforts.

By the Hyrax team·5 min read·May 1, 2026
TL;DR
  1. 1.Definition
  2. 2.2024 CWE Top 25 Selected Entries
  3. 3.How the CWE Top 25 is Calculated
  4. 4.CWE Top 25 vs. OWASP Top 10
  5. 5.Using the CWE Top 25 in Practice

Definition

The CWE Top 25 Most Dangerous Software Weaknesses is an annual list published jointly by MITRE and the SANS Institute that ranks the 25 most prevalent and impactful software weakness types based on analysis of real-world CVE data. Unlike the OWASP Top 10, which focuses on web application risk categories, the CWE Top 25 covers all software types — web, desktop, embedded, mobile — and is based on empirical frequency data from tens of thousands of published CVEs.

The list is derived by scoring each CWE based on how frequently it appears in CVEs and how severe those CVEs are (using CVSS scores). CWEs that appear often in highly severe vulnerabilities rank highest.

2024 CWE Top 25 Selected Entries

The 2024 list top entries illustrate the breadth of weakness types covered:

  1. CWE-787: Out-of-bounds Write — writing data beyond buffer boundaries
  2. CWE-79: Cross-site Scripting — improper input neutralization in web page output
  3. CWE-89: SQL Injection — improper neutralization in SQL commands
  4. CWE-416: Use After Free — referencing freed memory
  5. CWE-78: OS Command Injection — improper neutralization in OS commands
  6. CWE-20: Improper Input Validation — failure to validate or incorrectly validate input
  7. CWE-125: Out-of-bounds Read — reading data beyond buffer boundaries
  8. CWE-22: Path Traversal — improper path limitation for restricted directory
  9. CWE-352: Cross-Site Request Forgery — website does not verify request origin
  10. CWE-434: Unrestricted Upload of File with Dangerous Type

How the CWE Top 25 is Calculated

MITRE calculates the ranking using a scoring formula that combines:

  • Frequency — how often the CWE appears in CVE entries from the previous year
  • Severity — the average CVSS score of CVEs mapped to that CWE
  • The combined score produces a normalized rank that balances prevalence with impact

This data-driven approach distinguishes the CWE Top 25 from opinion-based lists and ensures it reflects what is actually being exploited in practice, not what researchers theorize is important.

CWE Top 25 vs. OWASP Top 10

PropertyCWE Top 25OWASP Top 10
ScopeAll software typesWeb applications specifically
BasisCVE frequency + CVSS severity dataCommunity survey + application security data
AbstractionCode-level weakness typesHigh-level risk categories
Update frequencyAnnualEvery 3-4 years
Primary useSecure coding, SAST configurationWeb app security baseline, compliance

Using the CWE Top 25 in Practice

Secure coding training

The Top 25 provides a concrete list of weakness types that developers should understand. Training programs built around the Top 25 cover the root causes of the majority of real-world CVEs.

SAST configuration

Static analysis tools should be configured to detect all 25 weakness types at minimum. The Top 25 provides a vendor-neutral baseline for what any security scanner should cover.

Compliance and audit

Several compliance frameworks reference the CWE Top 25. FedRAMP and DISA STIGs use CWE IDs in their security requirements. Having documented coverage of all Top 25 weaknesses is a strong compliance position.

Vulnerability triage

When triaging a large backlog of findings, Top 25 CWE membership is a useful secondary prioritization signal. A vulnerability mapped to a Top 25 CWE is statistically more likely to be exploitable and impactful than one mapped to a lower-ranked CWE.

The CWE Top 25 and Autonomous Code Governance

The CWE Top 25 defines the minimum detection coverage for every codebase governed by Hydra. Hydra's detection rules map to every Top 25 entry, with language-specific and framework-specific variants for each CWE category. When a codebase is onboarded, Hydra immediately produces a coverage report showing which Top 25 categories have findings and which are clean — giving security teams a clear picture of their posture against the industry's most dangerous weakness types before any remediation begins.

Frequently Asked Questions

Is the CWE Top 25 the same every year?

No. The ranking changes annually based on new CVE data. Some CWEs consistently rank in the top 10 (Out-of-bounds Write, XSS, SQL Injection) while others fluctuate. New CWEs enter the list as emerging vulnerability patterns become more prevalent. The annual update ensures the list reflects current attacker behavior.

Should I focus on the Top 25 or the full CWE list?

Start with the Top 25 — it covers the weaknesses most likely to result in real-world exploitation. Once Top 25 coverage is established, expand to the broader CWE list based on your specific technology stack and threat model. The full CWE catalog contains 900+ entries; comprehensive coverage is a long-term goal, not a starting point.

How does the CWE Top 25 relate to PCI-DSS and other compliance frameworks?

PCI-DSS 4.0 and other frameworks do not directly mandate CWE Top 25 coverage, but they require vulnerability scanning and secure coding practices that are most naturally fulfilled by covering Top 25 weaknesses. FedRAMP and DISA STIG requirements reference specific CWE IDs that largely overlap with the Top 25. Having documented Top 25 coverage strengthens any compliance audit.

Stop flagging. Start fixing.

Hyrax reviews your pull requests, remediates issues autonomously, and closes the ticket.

Join the waitlist