Common Weakness Enumeration (CWE)
The Common Weakness Enumeration (CWE) is a community-developed catalogue of software and hardware weakness types maintained by MITRE. Unlike CVEs (which describe specific vulnerabilities in specific products), CWEs describe the underlying weakness categories — such as buffer overflow or improper input validation — that give rise to vulnerabilities.
The Common Weakness Enumeration (CWE) is a community-developed catalogue of software and hardware weakness types maintained by MITRE. Unlike CVEs (which describe specific vulnerabilities in specific products), CWEs describe the underlying weakness categories — such as buffer overflow or improper input validation — that give rise to vulnerabilities.
CVD & Vulnerability ManagementWhat Is the Common Weakness Enumeration?
The Common Weakness Enumeration (CWE) is a hierarchically organised catalogue of software and hardware weakness types, maintained by MITRE with support from the cybersecurity community. Each CWE entry describes a specific weakness category — a type of flaw in design, code, or architecture that can lead to vulnerabilities — rather than a specific vulnerability in a specific product. For example, CWE-79 describes Cross-Site Scripting as a weakness type; any specific web application vulnerability involving reflected XSS would be assigned the relevant CVE for that product, but its root cause would be mapped to CWE-79. The CWE catalogue contains over 900 weakness types, organised in a taxonomy from abstract (CWE-693: Protection Mechanism Failure) to concrete (CWE-120: Buffer Copy Without Checking Size of Input).
CWE vs CVE: Understanding the Difference
CVE (Common Vulnerabilities and Exposures) and CWE are complementary but distinct systems:
- CVE identifies specific vulnerability instances in specific products at specific versions — 'CVE-2021-44228 is a vulnerability in Apache Log4j 2.x'.
- CWE identifies the type of weakness that caused the vulnerability — 'CVE-2021-44228 is caused by CWE-917: Improper Neutralisation of Special Elements used in an Expression Language Statement'.
CVE entries in the NVD typically include one or more CWE mappings to describe the underlying weakness type. CVSS scores in the NVD are supplemented by CWE information to help security teams understand root causes. For manufacturers, CWE mappings of known vulnerabilities in their products provide essential data for root cause analysis, identifying systematic weakness patterns in their codebase.
Using CWE in Threat Modelling and Secure Development
CWE is particularly valuable for the threat modelling and secure development lifecycle activities required by the CRA's Annex I essential requirements. Manufacturers can use CWE to:
- Identify design-level weaknesses: MITRE's CWE Top 25 Most Dangerous Software Weaknesses is an annually updated list of the most commonly exploited weakness types, providing a prioritised checklist for code review and design review.
- Pattern-match against past vulnerabilities: If a manufacturer has had multiple CVEs with the same CWE root cause, this signals a systematic weakness in their development process that should be addressed through training, tooling, or design pattern changes.
- Configure static analysis tools: SAST tools can be configured to detect specific CWE patterns — focusing scanning effort on the weakness types most relevant to the product's technology stack.
- Structure security requirements: Translating Annex I essential requirements into concrete CWE-based absence requirements (e.g., 'no instances of CWE-89 in database interaction code').
CWE in Security Advisories and CSAF Documents
Security advisories published by manufacturers should include the CWE identifier(s) for the underlying weakness type in addition to the CVE identifier and CVSS score. This practice, increasingly expected by vulnerability management tools and security researchers, provides important context: a CVSS 9.8 vulnerability caused by CWE-798 (Use of Hard-coded Credentials) requires a different remediation approach than a CVSS 9.8 vulnerability caused by CWE-787 (Out-of-bounds Write). CSAF (Common Security Advisory Framework) documents support CWE fields natively. Including CWE mappings in CSAF advisories enables downstream vulnerability management tools to correlate advisories with code review findings and helps the security community understand manufacturer weakness patterns over time. CVD Portal's advisory generation supports CWE field inclusion in CSAF output.
CVD Portal makes Common Weakness Enumeration (CWE) compliance straightforward.
Public CVD submission portal, acknowledgment tracking, Article 14 deadline alerts, and CSAF advisory generation. Free forever for EU manufacturers.
Start your free portalFrequently asked
Is CWE mapping required in CRA security advisories?+
The CRA does not explicitly mandate CWE mapping in security advisories. However, CSAF format — the machine-readable advisory format recommended for CRA compliance — supports and encourages CWE fields. Industry best practice and NVD conventions both include CWE mappings in vulnerability disclosures. Manufacturers that include CWE data in their advisories provide significantly more useful information to users and downstream vulnerability management tools, and demonstrate a mature vulnerability handling process.
What is the CWE Top 25?+
The CWE Top 25 Most Dangerous Software Weaknesses is an annually updated list published by MITRE, ranking the most prevalent and impactful software weaknesses based on analysis of CVE data from the previous year. For 2024, it includes perennials such as Out-of-Bounds Write (CWE-787), Cross-Site Scripting (CWE-79), and SQL Injection (CWE-89). The list provides manufacturers with a data-driven starting point for prioritising which weakness types to focus on in code reviews, training, and static analysis tooling configuration.
How does CWE relate to the OWASP Top 10?+
The OWASP Top 10 is a focused list of the most critical web application security risks, published by the Open Web Application Security Project. Each OWASP Top 10 category maps to one or more CWE entries — for example, OWASP A03 Injection covers CWE-89 (SQL Injection), CWE-77 (Command Injection), and others. CWE is the broader, more granular taxonomy; OWASP Top 10 is a curated subset focused on web applications. Manufacturers of web-connected products should use both — CWE for comprehensive static analysis and OWASP for web-layer-specific threat modelling.
Related terms
Browse the full CRA Compliance Checklist
See how Common Weakness Enumeration (CWE) fits into your complete CRA compliance programme.