CCyberwiki

Common Weakness Enumeration

Common Weakness Enumeration
AbbreviationCWE
Maintained byThe MITRE Corporation
SponsorCISA, U.S. Department of Homeland Security
First release2006
Current version5.0, with 956 weaknesses (November 2026)
Identifier formCWE-89
Websitecwe.mitre.org

The Common Weakness Enumeration (CWE) is a public catalogue of the types of mistakes in software and hardware that can lead to a vulnerability. Each type has a number, written as an identifier such as CWE-89 for SQL injection, a name and a description.1 The list is maintained by the MITRE Corporation, sponsored by the Cybersecurity and Infrastructure Security Agency (CISA) of the U.S. Department of Homeland Security, and free to use for research and commercial work.2

CWE separates a weakness from a vulnerability. A weakness is a general condition, such as a database query built by joining text, that can occur in many products. A vulnerability is one concrete occurrence of one or more weaknesses in a named product, and is tracked by Common Vulnerabilities and Exposures. A single CWE entry is therefore the root cause of many CVE Records.2

History

MITRE began grouping flaw types in 1999, while building the CVE List. In 2005, as part of the SAMATE project run by NIST, it published PLOVER, a working document that sorted more than 1,500 real CVE examples into 290 weakness types. The first CWE list followed in 2006 and also drew on other taxonomies, among them the McGraw/Fortify Kingdoms. Entries for mobile applications were added in 2014 and hardware weaknesses in 2020.3 MITRE publishes new versions three to four times a year; new entries are drafted in public in a GitHub repository first.1 Version 5.0 lists 956 weaknesses.4

Structure

A CWE identifier belongs to one of four types. A weakness describes one kind of mistake. A category groups weaknesses that share an attribute, for example Concurrency Issues. A view is a predefined selection of entries arranged for one purpose or audience. A compound element joins weaknesses into a chain, where one leads to the next, or a composite, where several must be present together; Cross-Site Request Forgery (CWE-352) is a composite.2

Weaknesses sit at four levels of abstraction, from general to specific:2

Table 1. Abstraction levels of CWE weaknesses
LevelScopeExample
PillarThe most abstract groupings
ClassIndependent of language and technology; described by one or two dimensions out of behaviour, property and resourceCWE-74, Injection
BaseMostly independent of technology, but specific enough to say how to detect and prevent itCWE-79, Cross-site Scripting
VariantTied to a language, technology or contextCWE-83, Improper Neutralization of Script in Attributes in a Web Page

Entries are linked by relationships such as ChildOf, ParentOf and CanAlsoBe. CWE-89 (SQL injection) is a Base weakness, a child of the Class CWE-943, which covers special elements in data query logic, and the parent of CWE-564, a Variant for Hibernate queries built from outside input.5

The main views are Software Development (CWE-699), arranged around concepts that architects, designers, programmers and testers work with, and Research Concepts (CWE-1000), which orders weaknesses by behaviour for research; a third, Hardware Design, does the same for hardware. Other views collect the entries behind an outside list, such as the OWASP Top Ten or the SEI CERT coding standards.1

Entries

A weakness page has a fixed set of fields. On the page for CWE-89 these include the abstraction level, alternate terms (SQLi), common consequences with the security area affected, potential mitigations by development phase, demonstrative code examples, detection methods, a likelihood of exploit (High) and selected observed examples. The observed examples are CVE identifiers, such as CVE-2024-6847, an SQL injection in an AI chatbot through a chat message; the page calls the list a sample of the CVEs linked to the weakness.5

Mapping vulnerabilities

Assigning a CWE to a vulnerability is called root cause mapping. The CWE in a CVE Record comes from the CVE Numbering Authority that published it or is added afterwards, for example by CISA's Vulnrichment project.6 MITRE's mapping guidance is written mainly for these authorities.7 The National Vulnerability Database has added its own mappings, chosen from View-1003, a reduced set of 130 weaknesses; a record outside that set is marked NVD-CWE-Other, and one with too little information NVD-CWE-noinfo.6

Each weakness page carries a mapping label: Allowed, Allowed with review of the mapping notes, Discouraged or Prohibited. The guidance asks for a Base or Variant entry where one fits, a Class only when none does, and never a category.7 CWE-20, Improper Input Validation, is a Class marked Discouraged, because reports with little detail often pick it where a more exact entry exists, and it is of no use for trend analysis.8 Across the industry, mapping is not yet accurate at scale.7

CWE Top 25

MITRE ranks the weaknesses behind recent CVE Records once a year; the 2025 ranking drew on 39,080 records published between 1 June 2024 and 1 June 2025. For each weakness it counts how often the weakness was mapped and averages the Common Vulnerability Scoring System base score of those records, scales both between the lowest and highest values in the data, and multiplies the two; only records with a CVSS 3.0 or 3.1 score are counted. A weakness that is common but low in impact, or severe but rare, does not rank high. Before scoring, 9,468 records with vague mappings went back to the 281 CNAs that published them, and 170 of them replied. 2025 was the first year that an LLM tool suggested mappings and that mappings were not reduced to View-1003.6

Cross-site scripting (CWE-79) ranked first with a score of 60.38, followed by SQL injection (CWE-89) at 28.72 and Cross-Site Request Forgery (CWE-352) at 13.64. Missing Authorization (CWE-862) rose five places to fourth. The table also gives, for each weakness, the number of its CVEs in the Known Exploited Vulnerabilities catalog catalog.9

Relation to other standards

CWE names the type of flaw, CVE the individual flaw, and CVSS how severe that flaw is; Exploit Prediction Scoring System and KEV add whether it is likely to be or has been exploited. The OWASP Top 10 groups CWEs into broader risk categories: A05:2025 Injection covers 37 CWEs, including CWE-79 with more than 30,000 CVEs and CWE-89 with more than 14,000.10 A sister list, CAPEC, catalogues attack patterns that exploit the weaknesses.2 For security tools that search for weaknesses, such as SAST and DAST scanners, CWE is the shared reference for naming what they find, and organisations use it to evaluate those tools.2

In SecFlash

In the SecFlash list of issue codes, each code that matches a weakness type names its CWE. SF-SEC-704 (SQL built from strings) and SF-SEC-601 (SQL injection) on the Security page both map to CWE-89, and SF-SEC-103 (content security policy missing) maps to CWE-693.

See also

References

  1. a b c MITRE (2026). "About CWE". Common Weakness Enumeration.
  2. a b c d e f MITRE. "Frequently Asked Questions (FAQ)". Common Weakness Enumeration.
  3. back MITRE. "History". Common Weakness Enumeration.
  4. back MITRE (2026). "CWE List Version 5.0". Common Weakness Enumeration.
  5. a b "CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')". Common Weakness Enumeration. MITRE.
  6. a b c MITRE (2026). "2025 CWE Top 25: Methodology". Common Weakness Enumeration.
  7. a b c MITRE. "CVE to CWE Mapping: Root Cause Mapping Guidance". Common Weakness Enumeration.
  8. back MITRE. "CWE-20: Improper Input Validation". Common Weakness Enumeration.
  9. back MITRE (2025). "2025 CWE Top 25 Most Dangerous Software Weaknesses". Common Weakness Enumeration.
  10. back "A05:2025 Injection". OWASP Top 10:2025. OWASP Foundation.