CWE: Common Weakness Enumeration
What CWE classifies, how it relates to CVE and the OWASP Top 10, and the CWE IDs that come up most in web testing.
What Is CWE (Common Weakness Enumeration)
A useful way to remember the difference: a CVE says "this product version has this vulnerability"; a CWE says "this is the kind of mistake that caused it." One CWE can underlie thousands of CVEs, and findings in custom applications that never get a CVE can still be classified by CWE.
How CWE Is Organized
| Level | Abstraction | Example |
|---|---|---|
| Pillar | Highest-level theme | CWE-707 Improper Neutralization |
| Class | Abstract, independent of language or technology | CWE-74 Injection |
| Base | Specific enough to detect and fix | CWE-89 SQL Injection |
| Variant | Tied to a specific language or technology | CWE-564 SQL Injection: Hibernate |
CWE IDs Common in Web and API Testing
| CWE | Weakness | Glossary |
|---|---|---|
| CWE-79 | Cross-site scripting | XSS |
| CWE-89 | SQL injection | SQLi |
| CWE-78 | OS command injection | RCE |
| CWE-94 | Code injection | RCE |
| CWE-502 | Deserialization of untrusted data | RCE |
| CWE-918 | Server-side request forgery | SSRF |
| CWE-639 | Authorization bypass through user-controlled key | IDOR |
| CWE-862 | Missing authorization | BOLA |
| CWE-352 | Cross-site request forgery | |
| CWE-22 | Path traversal |
The CWE Top 25
MITRE, with CISA, publishes the CWE Top 25 Most Dangerous Software Weaknesses, ranked from analysis of real CVE records using frequency and severity. The OWASP Top 10 also maps each of its categories to CWE IDs; the 2025 edition maps 248 CWEs across its ten categories.
How CWE Is Used
- Classifying findings from SAST, DAST and penetration tests consistently
- Trend analysis: which weakness types recur in your code
- Training and secure coding standards targeted at recurring CWEs
- Mapping to frameworks such as the OWASP Top 10
Sources and Standards
- MITRE CWE
- MITRE CWE Top 25 Most Dangerous Software Weaknesses
- OWASP Top 10:2025 Introduction (CWE mapping)
Frequently Asked Questions
What does CWE stand for?
Common Weakness Enumeration.
What is the difference between CWE and CVE?
CWE classifies types of weaknesses. CVE identifies specific vulnerabilities in specific products. A CVE is typically mapped to one or more CWEs.
Who maintains CWE?
MITRE maintains CWE with community input; the CWE Top 25 is published with CISA.
What CWE is SQL injection?
CWE-89. Cross-site scripting is CWE-79 and SSRF is CWE-918.
Further Reading
- FireCompass web application penetration testing
- Web Application Penetration Testing in 2026: A Practical Guide for CISOs
Related Terms
Find the Weaknesses in Your Own Code Paths
Run a free AI pentest and get findings mapped to CWE with proof of exploit.
Free AI Pen TestNo credit card. Findings include reproducible steps and exploit code.
