# KEV cwes Field vs CVE Record CWE: 161 Entries Disagree

> KEV's cwes array and the CVE record's problemTypes are two separate CWE mappings. An audit of all 1,808 entries in KEV catalog 2026.11.27 against their cvelistV5 records shows where they match, where they disagree, and which one to report on.

- URL: https://firewallsync.com/posts/kev-cwes-field-vs-cve-record-problemtypes-cwe-disagreements/
- Site: FirewallSync (https://firewallsync.com/)
- Topic: Security Operations
- Tags: cisa kev, kev cwes, cwe, cve problemtypes, cisa-adp, cve json 5, vulnerability management
- Published: 2026-11-30
- Author: Craig Leslie

## Key takeaways

- KEV's cwes is an array of 'CWE-NNNN' strings that CISA writes per entry. The schema calls them 'Common Weakness Enumeration (CWE) codes associated with this vulnerability' and does not say where they come from.
- In catalog 2026.11.27, 1,631 of 1,806 entries with a cvelistV5 record carry at least one KEV CWE; 175 carry none.
- Where both KEV and the record have a CWE (1,525 entries), KEV equals the record's CWE set exactly in 1,300 (85.2%), overlaps partly in 64 (4.2%) and shares nothing in 161 (10.6%).
- When the CNA set a CWE, KEV copies it exactly in 691 of 723 cases (95.6%). Most disagreements are against CISA-ADP's later mapping on older CVEs, often a broad KEV value such as CWE-119 against a specific ADP value such as CWE-787.
- For weakness-class reporting, take the CNA's problemTypes, fall back to CISA-ADP, and use KEV cwes only when the record has no CWE (106 entries). Keep KEV cwes as a second column, not a replacement.



**Short answer:** KEV's `cwes` array and the CWE in the CVE record are two separate mappings that usually agree. In KEV catalog **2026.11.27**, across the **1,525** entries where both carry a CWE, the sets are identical in **85.2%** and share no CWE at all in **161** entries (10.6%). If you report KEV by weakness class, take the CNA's `problemTypes` first, CISA-ADP's second, and KEV's `cwes` only when the record has none.

This extends the [KEV JSON feed field guide](/posts/cisa-kev-json-feed-what-each-field-means-and-how-to-match-it-against-a-scanner-export/) and the [CVE problemTypes and cweId guide](/posts/cve-problemtypes-cweid-cwe-from-cve-json/). In the [CVE-record-to-ticket prioritization workflow](/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/), CWE is a grouping and reporting field, not a priority signal, so this matters for dashboards and root-cause trends rather than for which ticket goes first.

## Method

- KEV: `known_exploited_vulnerabilities.json` from `cisagov/kev-data` (main), `catalogVersion` 2026.11.27, 1,808 entries, fetched 2026-11-30.
- CVE records: the cvelistV5 `main` record for every KEV CVE, fetched from raw.githubusercontent.com the same morning. 1,806 resolved; CVE-2026-120705 and CVE-2026-129243 (both GeoServer, added 2026-11-27) had no record yet.
- Record CWE: every `cweId` in `containers.cna.problemTypes`, and separately every `cweId` in the `problemTypes` of the CISA-ADP container. Free-text problem types without a `cweId` are ignored.
- Comparison is on sets of IDs. "Record CWE" means the CNA set if non-empty, otherwise the CISA-ADP set. In only three records did both containers carry a CWE, and in all three they were the same.

All counts below come from the script in [the audit script](#the-audit-script) section, run with Python 3.13. They are a point-in-time snapshot: KEV entries and CVE records both change.

## What the two fields promise

The KEV schema describes `cwes` as `"Common Weakness Enumeration (CWE) codes associated with this vulnerability. CWEs are in the format CWE-NNNN; note that the number portion can have any number of digits"`, with item pattern `^CWE-([0-9])+$`. It is not in the schema's `required` list. Nothing in the schema says whether CISA copies the value from the CNA, from its own ADP analysis or from elsewhere.

In the CVE record, a CWE lives in `problemTypes[].descriptions[].cweId`, and can appear in the CNA container, in the CISA-ADP container, or both. The [problemTypes guide](/posts/cve-problemtypes-cweid-cwe-from-cve-json/) covers how to extract it.

## How often they agree

| KEV cwes vs record CWE (catalog 2026.11.27) | Entries |
|---|---:|
| Equal to the CNA's CWE set | 691 |
| Equal to CISA-ADP's CWE set (CNA gave none) | 609 |
| Partial overlap (KEV adds a CWE: 55; KEV drops one: 9) | 64 |
| Disjoint, record CWE from CISA-ADP | 137 |
| Disjoint, record CWE from the CNA | 24 |
| KEV has a CWE, record has none | 106 |
| KEV empty, record has a CWE | 66 |
| Both empty | 109 |
| **Total with a record** | **1,806** |

Two readings matter:

- **When the CNA mapped a CWE, KEV almost always copies it.** Of 723 entries where both KEV and the CNA carry a CWE, 691 (95.6%) are identical and 24 (3.3%) share nothing.
- **Most disagreement is with CISA-ADP, on older entries.** Of the 161 disjoint entries, 127 were added to KEV in 2021 or 2022, the catalog's first two years, when many older CVEs went in. The CISA-ADP CWE in those records is a separate, usually more specific mapping.

KEV carries 206 distinct CWE IDs across 1,770 values; 119 entries list more than one.

## What the disagreements look like

The most common disjoint pairs (KEV value first, record value second):

| KEV cwes | Record CWE | Entries |
|---|---|---:|
| CWE-119 | CWE-787 | 22 |
| CWE-119 | CWE-120 | 9 |
| CWE-399 | CWE-416 | 5 |
| CWE-20 | CWE-94 | 5 |
| CWE-189 | CWE-190 | 5 |
| CWE-122 | CWE-787 | 4 |
| CWE-23 | CWE-22 | 4 |

The pattern is abstraction level. KEV often holds the broader parent; the record holds a specific child:

- **CWE-119** ("Improper Restriction of Operations within the Bounds of a Memory Buffer") carries the MITRE vulnerability-mapping usage **DISCOURAGED**: "This CWE ID should not be used to map to real-world vulnerabilities". KEV uses it on 88 entries; 43 of those records carry a different CWE as well or instead, typically CWE-787 or CWE-120.
- **CWE-399** is a grouping ("Resource Management Errors") whose usage is **PROHIBITED**: "this CWE ID must not be used to map to real-world vulnerabilities". It still appears on 18 KEV entries. In five, the record maps the same CVE to CWE-416 (use after free).

A few disagreements are not about abstraction. Recent examples where the CNA itself chose differently:

| CVE | KEV cwes | CNA problemTypes |
|---|---|---|
| CVE-2026-132165 (Drupal core installer) | CWE-636 | CWE-306 |
| CVE-2026-81578 | CWE-306 | CWE-305 |
| CVE-2026-85706 | CWE-35 | CWE-22 |
| CVE-2026-88771 | CWE-119 | CWE-20 |

These are legitimate differences in interpretation (CWE-636 is "Not Failing Securely"; CWE-306 is "Missing Authentication for Critical Function"). Neither is a data error you can fix; you just need to decide which one your report counts.

## Which CWE to use

For weakness-class reporting on KEV findings, a simple, defensible precedence:

1. **CNA `problemTypes`.** The CNA is the record's owner and usually closest to the code. Present on 728 of 1,806 records.
2. **CISA-ADP `problemTypes`.** Fills most of the remaining gap (present on 866 records, almost always where the CNA left it empty).
3. **KEV `cwes`.** Use it when the record has no CWE at all. That is the case for 106 entries, where KEV is the only machine-readable CWE available.

Then:

- **Keep KEV `cwes` as its own column.** Disagreement is useful information: a broad KEV value next to a specific ADP value tells you the specific one is the better root-cause bucket.
- **Flag DISCOURAGED and PROHIBITED IDs** (such as CWE-119 and CWE-399) in reports rather than trending them, or roll them up explicitly. The [CVE problemTypes guide](/posts/cve-problemtypes-cweid-cwe-from-cve-json/) notes the same issue for raw CVE data.
- **Don't use CWE to order work.** Exploitation status, SSVC and EPSS decide order; see [CVSS vs EPSS vs KEV](/posts/cvss-vs-epss-vs-kev-which-signal-should-decide-what-you-patch-first/).

## The audit script

Run against a local copy of the KEV JSON and a directory of cvelistV5 records (one file per KEV CVE). It prints the comparison table above and the CWE-119 split.

```python
"""Compare KEV cwes with CWE IDs in each CVE record (CNA and CISA-ADP problemTypes).
Usage: python3 kev_cwe_audit.py known_exploited_vulnerabilities.json recs/
recs/ holds cvelistV5 records named CVE-YYYY-NNNN.json."""
import json, sys, collections, pathlib

def cwe_ids(container):
    return {d["cweId"].strip()
            for pt in container.get("problemTypes", []) or []
            for d in pt.get("descriptions", [])
            if d.get("cweId")}

kev = json.load(open(sys.argv[1]))
recs = pathlib.Path(sys.argv[2])
tally = collections.Counter()
cwe119 = collections.Counter()
for v in kev["vulnerabilities"]:
    path = recs / f'{v["cveID"]}.json'
    try:
        rec = json.loads(path.read_text())
    except (OSError, ValueError):
        tally["no record"] += 1
        continue
    k = set(v.get("cwes") or [])
    cna = cwe_ids(rec["containers"]["cna"])
    adp = set().union(*[cwe_ids(a) for a in rec["containers"].get("adp", [])
                        if a["providerMetadata"].get("shortName") == "CISA-ADP"])
    rec_cwe = cna or adp            # CNA first, CISA-ADP as fallback
    if not k:
        tally["KEV empty, record has CWE" if rec_cwe else "both empty"] += 1
    elif not rec_cwe:
        tally["KEV only (record has none)"] += 1
    elif k == rec_cwe:
        tally["equal to " + ("CNA" if cna else "CISA-ADP")] += 1
    elif k & rec_cwe:
        tally["partial overlap"] += 1
    else:
        tally["disjoint vs " + ("CNA" if cna else "CISA-ADP")] += 1
    if "CWE-119" in k:
        cwe119["record has other CWE" if rec_cwe - {"CWE-119"} else "no other"] += 1
for key, n in sorted(tally.items(), key=lambda x: -x[1]):
    print(f"{n:5d}  {key}")
print("KEV CWE-119 entries:", dict(cwe119))
```

Fetching the records: build one raw.githubusercontent.com URL per KEV CVE (`cves/<year>/<NNN>xxx/<CVE-ID>.json` on `CVEProject/cvelistV5` main) and download them with `curl --parallel`. Files that are not valid JSON (missing records return an error body) are counted as "no record".

## Common mistakes

- **Treating KEV `cwes` as authoritative.** It is CISA's per-entry list, and in 161 entries it shares nothing with the CVE record.
- **Overwriting the record CWE with KEV's.** You lose the more specific mapping in most disagreements.
- **Counting CWE-119 and CWE-787 as separate trends.** On older KEV entries they are often the same bug at different abstraction levels.
- **Ignoring the 106 record-less cases.** For those, KEV `cwes` is the only CWE you have; dropping KEV from the precedence leaves them blank.

## Limits of this article

- Snapshot of KEV 2026.11.27 and cvelistV5 main on 2026-11-30. Both change; rerun the script before relying on the counts.
- KEV publishes no provenance for `cwes`, so this article does not claim where CISA takes each value from. NVD's own CWE mapping was not compared (NVD is not reachable from our tooling).
- Only `cweId` values are compared. Free-text problem types and CWE parent/child relationships are not resolved, so a parent and child pair counts as "disjoint".
- Only CWE-119 and CWE-399 mapping usages were checked against the CWE site (CWE 5.0 pages).

## Sources and verification

| Important claim | Source | Status |
|---|---|---|
| Catalog 2026.11.27, 1,808 entries; cwes values and counts | [cisagov/kev-data JSON](https://github.com/cisagov/kev-data) | Verified (computed) |
| cwes description and pattern; not required | [KEV JSON schema](https://github.com/cisagov/kev-data/blob/main/known_exploited_vulnerabilities_schema.json) | Verified |
| Record CWEs, CNA vs CISA-ADP; all comparison counts | [CVEProject/cvelistV5](https://github.com/CVEProject/cvelistV5) records, script above | Verified (computed, point in time) |
| CWE-119 usage DISCOURAGED | [CWE-119](https://cwe.mitre.org/data/definitions/119.html) | Verified |
| CWE-399 is a grouping, usage PROHIBITED | [CWE-399](https://cwe.mitre.org/data/definitions/399.html) | Verified |
| Where CISA sources KEV cwes | Not published | Not claimed |

## Frequently asked questions

### What is the cwes field in the CISA KEV JSON?

It is an array of CWE identifiers on each KEV entry. The KEV JSON schema describes it as 'Common Weakness Enumeration (CWE) codes associated with this vulnerability' and requires each item to match the pattern ^CWE-([0-9])+$. It is not marked required.

### Is KEV's CWE the same as the CWE in the CVE record?

Usually, not always. In KEV catalog 2026.11.27, among 1,525 entries where both carry a CWE, the sets are identical in 85.2% and fully disjoint in 10.6%. Where the CNA itself mapped a CWE, KEV matches it in 95.6% of cases.

### Which CWE should I use for KEV reporting?

Use the CNA's problemTypes in the CVE record first, then the CISA-ADP container's problemTypes, and KEV's cwes only when the record has none. Record which source you used, and keep the KEV value alongside so disagreements stay visible.

### Why does KEV sometimes list CWE-119 when the CVE record says CWE-787?

CWE-119 is a broad buffer-bounds weakness that MITRE marks as DISCOURAGED for mapping real-world vulnerabilities. Many older KEV entries carry it, while CISA-ADP's later mapping in the CVE record uses a more specific child such as CWE-787 (out-of-bounds write). 22 of the 161 disjoint entries are exactly that pair.


Image credit: Photo by [Jorge Franganillo](https://unsplash.com/photos/E0-pt-C9UwY) on Unsplash
