A CVE identifies one specific vulnerability in a specific product or library. A CWE names a category of weakness, such as a missing access check, that can show up in thousands of products. Think of CWE as the type of mistake and CVE as one recorded instance of it.
The two terms in plain words
MITRE describes the Common Weakness Enumeration as a community-developed catalog of software and hardware weaknesses. A weakness, in its definition, is a flaw in a software, firmware, hardware or service component that could, under certain conditions, lead to vulnerabilities.
A CVE entry is different. It points at a particular flaw in a particular piece of software, with affected versions. When a news story says "a critical vulnerability in library X", the CVE is the label people use to talk about that exact problem.
A worked example in words
Suppose a web app lets any logged-in user fetch another user's invoice by changing a number in the URL. The weakness is broken access control. Many apps have that same weakness, and the CWE catalog has entries describing it.
If one specific accounting product shipped that bug in version 4.2 and fixed it in 4.3, that single bug can get its own CVE. Next year a different product can have the same weakness and get a different CVE. Same CWE, two CVEs.
How the two fit together in practice
| Question | CVE | CWE |
|---|---|---|
| What does it describe? | One vulnerability in one product | A type of weakness |
| How many per product? | Many over time | A product can show many types |
| Useful for | Patching, tracking, advisories | Learning, code review, secure design |
| Who reads it most | Operations, security teams | Developers, reviewers, trainers |
Advisories often carry both. A GitHub advisory for an open source package lists the affected and patched versions, and many records link the CVE and the weakness type together. Reading both tells you what to patch and what pattern to avoid writing yourself.
How to use this when you are learning
- Pick five recent advisories for a language you know.
- For each, write down the weakness type in your own words before you look at the label.
- Check whether your guess matches the listed CWE.
- Find the fix commit and read the diff.
That loop trains you to see the pattern behind the number. The CWE site also publishes a Top 25 list of the most common and impactful weaknesses, and its latest edition is 2025. It is a reasonable reading list for the weaknesses employers ask about in interviews.
A last point on scoring. Neither a CVE nor a CWE is a severity score. Severity comes from a separate system, covered in our post on reading a CVSS vector string.
Where Safeguard fits
Safeguard maps findings from SBOM and dependency scanning to advisories and uses reachability analysis to show which ones your code can actually hit. You can try a free scan on a small project to see CVE records attached to real dependencies.
Quick check
Can one CWE apply to many CVEs?
Yes. A weakness type can appear in many products, and each recorded vulnerability gets its own CVE.
Is a CWE a vulnerability I can patch?
No. It describes a class of mistake. You patch a specific vulnerability, and you prevent the class through design and code review.
Sources
Last reviewed: 19 October 2026.