CWE (Common Weakness Enumeration)
What is CWE (Common Weakness Enumeration)?
CWE (Common Weakness Enumeration)A community-developed taxonomy of software and hardware weakness types — the underlying flaw classes that lead to vulnerabilities.
CWE is a hierarchical catalogue maintained by MITRE (launched in 2006) that classifies the root-cause weakness categories behind vulnerabilities, such as CWE-79 (Cross-Site Scripting) or CWE-787 (Out-of-Bounds Write). Where a CVE describes a specific defective product, the CWE explains the class of mistake that produced it; the National Vulnerability Database maps each CVE to one or more CWEs precisely so defenders can aggregate by flaw type.
Entries are organised by abstraction level — Pillar, Class, Base, and Variant — and grouped into views such as CWE-1000 (research concepts), CWE-699 (software development), and CWE-1194 (hardware design). This lets a reviewer move from a broad class like CWE-20 (Improper Input Validation) down to a precise variant.
The catalogue drives the annual CWE Top 25 Most Dangerous Software Weaknesses, scored from NVD CVE data weighted by CVSS severity and CISA KEV presence over a trailing year. In the 2024 list MITRE and CISA ranked CWE-79 (XSS) first and CWE-787 (Out-of-Bounds Write) second — a reversal from 2023, when out-of-bounds write topped the chart. SAST tools and the CWE Compatibility program use these identifiers to label findings, giving engineers a shared vocabulary to map secure-coding controls across the development lifecycle.
flowchart TD DEV[Coding / design mistake] --> WEAK[CWE weakness class<br/>e.g. CWE-787 Out-of-Bounds Write] WEAK -->|manifests in a product| VULN[Specific vulnerability] VULN -->|assigned| CVE[CVE identifier] CVE -->|NVD maps back to| WEAK WEAK --> TOP25[CWE Top 25<br/>scored via CVSS + KEV] WEAK --> SAST[SAST tool finding label] WEAK --> FIX[Secure-coding control / mitigation]
● Examples
- 01
CWE-89 — SQL Injection.
- 02
CWE-416 — Use After Free.
● Frequently asked questions
What is CWE (Common Weakness Enumeration)?
A community-developed taxonomy of software and hardware weakness types — the underlying flaw classes that lead to vulnerabilities. It belongs to the Vulnerabilities category of cybersecurity.
What does CWE (Common Weakness Enumeration) mean?
A community-developed taxonomy of software and hardware weakness types — the underlying flaw classes that lead to vulnerabilities.
How do you defend against CWE (Common Weakness Enumeration)?
Defences for CWE (Common Weakness Enumeration) typically combine technical controls and operational practices, as detailed in the full definition above.
What are other names for CWE (Common Weakness Enumeration)?
Common alternative names include: Weakness type, CWE identifier.