Skip to content
Fast-turnaround security assessments available — 10+ years development & security experienceGet started
Back to Glossary
Glossary2 min read

CWE (Common Weakness Enumeration)

A standardized catalog of software and hardware weakness types that can lead to security vulnerabilities.

The Common Weakness Enumeration (CWE) is a community-developed catalog of software and hardware weakness types. While a CVE identifies a specific vulnerability in a specific product, a CWE describes the underlying type of flaw that makes that vulnerability possible. For example, CVE-2024-12345 might be a specific SQL injection vulnerability in a particular application, while CWE-89 describes the general weakness category of SQL injection.

How It Works

CWE organizes weaknesses into a hierarchical structure. High-level categories describe broad weakness classes, while specific CWE entries describe precise flaw types. For example, CWE-20 (Improper Input Validation) is a broad category, while CWE-79 (Cross-Site Scripting) and CWE-89 (SQL Injection) are more specific weaknesses that fall under the input validation umbrella.

Each CWE entry includes a description of the weakness, the conditions under which it occurs, examples of vulnerable code, potential consequences if exploited, known mitigations, and relationships to other weaknesses. This structured information helps developers understand not just what can go wrong but why it happens and how to prevent it.

The CWE Top 25 Most Dangerous Software Weaknesses is published annually, ranking the most prevalent and impactful weakness types based on real-world vulnerability data. This list helps organizations focus their secure development efforts on the weakness categories most likely to appear in their code. Common entries include out-of-bounds write, cross-site scripting, SQL injection, use after free, and OS command injection.

Why It Matters

CWE provides the vocabulary for discussing vulnerability root causes. When a security assessment identifies a cross-site scripting vulnerability, referencing CWE-79 connects the finding to a wealth of information about the weakness class, including proven remediation strategies. Organizations can use CWE data to identify systemic patterns in their codebase, moving beyond fixing individual bugs to addressing the underlying coding practices that produce entire categories of vulnerabilities.

Need your application tested? Get in touch.

Need your application tested?

We find these vulnerabilities in real applications every day.

Request an Assessment