# CVE problemTypes and cweId: Getting CWE From CVE JSON

> The CWE for a CVE lives in problemTypes[].descriptions[].cweId, but a count across the November 15, 2026 cvelistV5 snapshot shows 24% of 2026 CVE records have no CNA cweId. Where the gaps come from, what CISA-ADP fills in (often CWE-284), and a parser that handles all four cases.

- URL: https://firewallsync.com/posts/cve-problemtypes-cweid-cwe-from-cve-json/
- Site: FirewallSync (https://firewallsync.com/)
- Topic: AppSec & APIs
- Tags: vulnerability management, cwe, cve json 5, problemtypes, cisa-adp, vulnrichment, cvelistv5, parsing
- Published: 2026-11-15
- Author: Craig Leslie

## Key takeaways

- In CVE JSON 5.x the CWE sits at containers.cna.problemTypes[].descriptions[].cweId, a string matching ^CWE-[1-9][0-9]*$. cweId is optional, and problemTypes itself is not in the schema's required list for a CNA container.
- In the cvelistV5 snapshot of November 15, 2026, 74,189 of 97,709 CVE records published in 2026 (75.9%) carry a CNA cweId. 13,044 (13.3%) have only text entries and 10,476 (10.7%) have no problemTypes at all.
- The gaps are concentrated: every 2026 Oracle and Apple record is text-only, no 2026 Linux kernel record includes problemTypes, and WPScan writes the CWE into the description with type CWE but no cweId field.
- CISA-ADP adds a cweId to 15,650 of the 2026 records the CNA left without one. Its most common gap-fill is CWE-284, which CWE marks DISCOURAGED for vulnerability mapping.
- A robust extractor reads the CNA cweId first, then CWE IDs named in CNA text, then CISA-ADP, and records which source it used so dashboards can separate supplier data from enrichment.



**Short answer:** the CWE for a CVE is in `containers.cna.problemTypes[].descriptions[].cweId`. That field is optional, and a lot of records do not have it. Of the 97,709 CVE records published in 2026 in the cvelistV5 snapshot of November 15, 2026, **24.1% have no CNA `cweId`**: 13,044 carry only text and 10,476 have no `problemTypes` at all. CISA-ADP fills 15,650 of those gaps, most often with CWE-284, a mapping CWE itself discourages. If you build CWE metrics from CVE JSON, read three places in a fixed order and keep track of which one answered.

This is a field-level guide for engineers building weakness dashboards, SAST/CVE correlation or CWE Top 25-style reports from raw CVE data. Where it fits in the larger triage flow is covered in the [vulnerability prioritization workflow](/posts/vulnerability-prioritization-workflow-cve-record-to-patch-ticket/). How ADP containers work in general is in [CVE ADP containers: CISA-ADP, CVE Program and supplier ADPs](/posts/cve-adp-containers-cisa-adp-cve-program-supplier-sadp/).

## The problemTypes structure

The [CVE Record Format schema](https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json) (v5.2.0 in the repository) defines `problemTypes` as an array with at least one item. Each item has a required `descriptions` array, and each description object looks like this:

| Property | Required | Schema constraint | What it holds |
|---|---|---|---|
| `lang` | yes | language tag | `en`, `en-US` |
| `description` | yes | string, 1-4096 chars | "Text description of problemType, or title from CWE or OWASP." |
| `cweId` | no | `^CWE-[1-9][0-9]*$`, 5-9 chars | "CWE ID of the CWE that best describes this problemType entry." |
| `type` | no | free string, 1-128 chars | "Problemtype source, text, OWASP, CWE, etc.," |
| `references` | no | references array | supporting links |

A well-formed CNA entry:

```json
"problemTypes": [
  { "descriptions": [
      { "lang": "en", "type": "CWE", "cweId": "CWE-352",
        "description": "CWE-352 Cross-Site Request Forgery (CSRF)" } ] }
]
```

Two schema details cause most parser bugs:

- **`problemTypes` is not required for a CNA.** The `cnaPublishedContainer` required list is `providerMetadata`, `descriptions`, `affected` and `references`. The schema's description text says the field "Must contain: At least one entry", but validation will not enforce that.
- **`type` is free text.** In the full corpus the most common values are `CWE` (198,469 descriptions) and `text` (183,625), then a missing `type` (19,161), `Impact` (2,778) and lower-case `cwe` (1,586), plus a tail of one-off values such as "RCE (Remote Code Execution)". `type: "CWE"` does not guarantee a `cweId` is present.

The program rules match the schema's looseness. [CNA Operational Rules 4.1.0](https://www.cve.org/Resources/Roles/Cnas/CNA_Rules_v4.1.0.pdf) (effective May 14, 2025), rule 5.1.7, say a CNA "MUST identify the type of Vulnerability" and that the record "SHOULD use the Common Weakness Enumeration (CWE)". A text label satisfies the MUST.

## How often the CNA supplies a cweId

We streamed the `2026-11-15_all_CVEs_at_midnight` release zip from cvelistV5 and counted every record in state `PUBLISHED`, grouped by the year of `cveMetadata.datePublished`. Each record lands in exactly one CNA bucket.

| Publication year | Published records | CNA cweId | CNA text only | No problemTypes | No cweId anywhere (CNA or CISA-ADP) |
|---|---|---|---|---|---|
| 2024 | 39,924 | 25,623 (64.2%) | 9,054 (22.7%) | 5,247 (13.1%) | 5,366 (13.4%) |
| 2025 | 48,150 | 34,764 (72.2%) | 6,982 (14.5%) | 6,404 (13.3%) | 5,626 (11.7%) |
| 2026 (to Nov 15) | 97,709 | 74,189 (75.9%) | 13,044 (13.3%) | 10,476 (10.7%) | 7,870 (8.1%) |

CNA coverage is improving year on year, but roughly one in four 2026 records still needs a fallback. Most records with a CNA `cweId` have exactly one: across all years, 157,531 of 177,478 (88.8%) list a single distinct CWE and 19,947 list two or more. Treat `cweId` as a set, not a scalar.

## Where the gaps come from

The gaps are not random. They follow individual CNAs' publishing habits, which matters because a dashboard filtered to one vendor can show zero CWE data for that vendor without anything being wrong with your parser.

| CNA (`assignerShortName`) | 2026 records | Pattern | Example |
|---|---|---|---|
| `Linux` | 8,262 | no `problemTypes` in any 2026 record | CVE-2026-74687 |
| `oracle` | 4,154 | all text only (risk sentence such as "Easily exploitable vulnerability allows ...") | CVE-2026-82997 |
| `mitre` | 3,773 | 3,027 text-only, description `n/a` | CVE-2026-104586 |
| `WPScan` | 2,314 | CWE named in text with `type: "CWE"`, no `cweId` (2,312 records) | CVE-2026-82126 |
| `apple` | 1,196 | all text only | CVE-2026-86917 |
| `Chrome` | 3,972 | 705 text-only (labels such as "Inappropriate implementation") | CVE-2026-106484 |
| `mozilla` | 968 | no `problemTypes` in any 2026 record | |

The WPScan pattern deserves its own handling. Its entries look like this:

```json
{ "description": "CWE-284 Improper Access Control", "lang": "en", "type": "CWE" }
```

A parser that only reads `cweId` drops these. In 2026, 3,063 records name a CWE ID only in CNA text, and 2,559 description objects have `type` `CWE` or `cwe` with no `cweId`, 2,359 of them from WPScan. CISA's own [Vulnrichment README](https://github.com/cisagov/vulnrichment) uses a WPScan record, CVE-2024-3477, as its example of CISA adding a CWE; the CNA text in that record already says "CWE-352 Cross-Site Request Forgery (CSRF)".

## What CISA-ADP adds

The [Vulnrichment README](https://github.com/cisagov/vulnrichment) says that once CVEs are SSVC-scored, "some higher-risk CVEs will also receive enrichment of CWE and/or CVSS data points, where possible", that CISA populates the ADP container only for CVEs "that do not already have these fields populated by the originating CNA", and that "At no point will CISA overwrite the originating CNA's data". If a CNA later adds the data, "the CISA ADP will drop its own assessments". When both exist, it says the CNA's data "should take precedence".

In 2026 records:

- CISA-ADP carries a `cweId` in 16,066 records. In 15,650 of them the CNA had none.
- In 416 records both containers carry a `cweId`; in 101 they differ. Per the README, prefer the CNA value.
- Of the 3,063 records where the CNA named a CWE only in text, CISA-ADP has a `cweId` in 2,591, and in 2,544 it is the same ID the text already named.
- The only other ADP supplying `cweId` across the corpus is `redhat-SADP` (1,124 records). CISA-ADP has 44,152.

The most frequent CWEs CISA-ADP adds when the CNA gave none, 2026 records:

| CWE | Records | CWE mapping note |
|---|---|---|
| CWE-284 Improper Access Control | 3,334 | Pillar; usage DISCOURAGED |
| CWE-200 Exposure of Sensitive Information | 975 | |
| CWE-79 Cross-site Scripting | 829 | |
| CWE-269 Improper Privilege Management | 717 | |
| CWE-416 Use After Free | 696 | |

CWE-284's own [definition page](https://cwe.mitre.org/data/definitions/284) (CWE 5.0) lists vulnerability mapping usage as "DISCOURAGED", says the ID "should not be used to map to real-world vulnerabilities", and calls it "extremely high-level, a Pillar" that is "not useful for trend analysis". Most of those 3,334 (2,624) are Oracle records whose CNA entry is text only. CVE-2026-82997 is one, where CISA-ADP adds CWE-284 to a CNA entry that reads "Easily exploitable vulnerability allows low privileged attacker with network access via T3, IIOP to compromise Service Delivery Platform." The pillar choice reflects how little the CNA text says, so treat these as "access-control-ish, details unknown", not as evidence that access control is your top weakness class.

## A parser that handles all four cases

This Python 3 function (tested with Python 3.13 against the five records listed below, fetched from `raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/...`) returns the CWE set and where it came from:

```python
import json, re, sys

CWE_RE = re.compile(r"\bCWE-[1-9][0-9]*\b")

def cwe_ids(record):
    """Return (ids, source) for one CVE JSON 5.x record.
    source: 'cna', 'cna-text', 'cisa-adp' or 'none'."""
    c = record["containers"]
    texts, ids = [], set()
    for pt in c["cna"].get("problemTypes", []):
        for d in pt.get("descriptions", []):
            if d.get("cweId"):
                ids.add(d["cweId"])
            else:
                texts.append(d.get("description", ""))
    if ids:
        return sorted(ids), "cna"
    found = {m for t in texts for m in CWE_RE.findall(t)}
    if found:
        return sorted(found), "cna-text"      # CWE named in prose only
    for adp in c.get("adp", []):
        if adp["providerMetadata"].get("shortName") != "CISA-ADP":
            continue
        for pt in adp.get("problemTypes", []):
            for d in pt.get("descriptions", []):
                if d.get("cweId"):
                    ids.add(d["cweId"])
    return (sorted(ids), "cisa-adp") if ids else ([], "none")

if __name__ == "__main__":
    for path in sys.argv[1:]:
        r = json.load(open(path))
        print(r["cveMetadata"]["cveId"], *cwe_ids(r))
```

Output on the November 15, 2026 versions of those records:

```text
CVE-2024-2905 ['CWE-732'] cna
CVE-2024-3477 ['CWE-352'] cna-text
CVE-2026-74687 [] none
CVE-2026-82126 ['CWE-284'] cna-text
CVE-2026-82997 ['CWE-284'] cisa-adp
```

Design choices, and their limits:

- **CNA text before CISA-ADP.** The CNA is the authoritative source under the README's precedence rule, and in 2,544 of 2,591 overlapping cases the two agree anyway. Swap the order if you only trust structured fields.
- **The regex can over-match.** A description such as "similar to CWE-79" would be captured. In the corpus the prose-only CWE strings are overwhelmingly titles in the form "CWE-NNN Name", but log `cna-text` results separately.
- **Keep the source column.** Store `source` with each row. It lets you report "CNA-mapped" and "enriched" weaknesses separately and lets you drop discouraged pillars from trend charts without losing the records.
- **Re-read on updates.** CISA-ADP values can disappear when a CNA adds its own. If you sync incrementally with [cvelistV5 delta.json and deltaLog.json](/posts/cvelistv5-delta-json-deltalog-incremental-cve-sync/), re-run the extractor on every updated record rather than caching the first answer.

## Common mistakes

- **Reading `problemTypes[0].descriptions[0].cweId` only.** 11.2% of records with CNA CWE data list more than one distinct CWE, and some put a text entry first.
- **Assuming `type` tells you what you have.** Lower-case `cwe`, missing `type` and `Impact` all occur.
- **Treating "no CWE" as "unknown vulnerability class" for every vendor equally.** Linux kernel and Mozilla records will always be in that bucket until those CNAs change practice.
- **Merging CISA-ADP CWE-284 into a Top-N chart without a label.** It becomes a top-three entry by volume in 2026 for reasons unrelated to the underlying bugs.
- **Mixing CWE with severity signals.** CWE says what kind of bug it is, not how urgent it is. Severity and exploitation come from [CVSS in the record](/posts/cve-json-cvss-metrics-cvssv4-0-cvssv3-1-basescore-trap/), [CISA's SSVC values](/posts/cisa-vulnrichment-how-to-read-ssvc-values-in-a-cve-record-and-turn-them-into-a-patch-decision/) and KEV.

## How MITRE's Top 25 deals with the same data

The [2025 CWE Top 25 methodology](https://cwe.mitre.org/top25/archive/2025/2025_methodology.html) used 39,080 CVE records published between June 1, 2024 and June 1, 2025, including mappings "added by CISA Vulnrichment after publication". About 9,468 (24%) were flagged for re-mapping review, for example where the CWE was too abstract or commonly misused. If you build an internal ranking from raw CVE data you get the unreviewed version of that dataset, so expect pillars and class-level CWEs to rank higher than they do in the published list.

## Limits of this article

- Counts come from one snapshot (the `cve_2026-11-15_0000Z` release) and change daily as records are published, updated and enriched.
- Years are grouped by `datePublished`, not by CVE ID year.
- We did not validate whether each CWE is the correct mapping for its vulnerability, only where it is recorded.
- CWE usage notes are quoted from CWE 5.0 for CWE-284 only; check the definition page of any other CWE before excluding it.

## Sources and verification

| Important claim | Source | Status |
|---|---|---|
| problemTypes structure, cweId pattern, CNA required fields | [CVE Record Format schema](https://github.com/CVEProject/cve-schema/blob/main/schema/CVE_Record_Format.json) | Verified |
| CNA MUST identify vulnerability type; SHOULD use CWE (rule 5.1.7) | [CNA Operational Rules 4.1.0](https://www.cve.org/Resources/Roles/Cnas/CNA_Rules_v4.1.0.pdf) | Verified |
| CNA/ADP coverage counts, CNA patterns, CISA-ADP gap-fill counts | cvelistV5 release `cve_2026-11-15_0000Z`, counted with Python | Verified (our count) |
| CISA-ADP adds CWE for some CVEs, never overwrites CNA, drops on CNA update, CNA precedence | [cisagov/vulnrichment README](https://github.com/cisagov/vulnrichment) | Verified |
| CWE-284 is a Pillar with mapping usage DISCOURAGED | [CWE-284 definition](https://cwe.mitre.org/data/definitions/284) | Verified |
| Top 25 2025 dataset size, window and re-mapping share | [2025 CWE Top 25 methodology](https://cwe.mitre.org/top25/archive/2025/2025_methodology.html) | Verified |

## Frequently asked questions

### Where is the CWE in a CVE JSON 5 record?

In containers.cna.problemTypes, an array of objects, each with a descriptions array. Each description has lang and description (required) and optional cweId, type and references. The machine-readable CWE is the cweId string, for example CWE-79. ADP containers such as CISA-ADP can carry their own problemTypes with the same structure.

### Why does a CVE record have no CWE?

The schema does not require one. CNA Rules 4.1.0 say a record MUST identify the type of vulnerability but only SHOULD use CWE, so a CNA can meet the rule with text such as 'Elevation of privilege' or 'n/a'. Some CNAs omit problemTypes entirely; in the November 15, 2026 snapshot that includes every 2026 record from the Linux kernel CNA.

### Does CISA add CWE to CVE records?

Yes, through the CISA-ADP container (Vulnrichment). CISA says it adds CWE and CVSS for some higher-risk CVEs where the CNA has not, never overwrites the CNA container, and drops its own values if the CNA later adds them. In 2026 records it supplied a cweId for 15,650 records that had none from the CNA.

### Should I count CWE-284 in a weakness dashboard?

Count it, but flag it. CWE lists CWE-284 Improper Access Control as a Pillar with vulnerability mapping usage DISCOURAGED and says it is not useful for trend analysis. In 2026 records it is the most common CWE that CISA-ADP adds when the CNA gave none, so a dashboard that merges sources without labels will inflate it.


Image credit: Photo by [Ilya Semenov](https://unsplash.com/photos/wooden-card-catalog-drawers-with-metal-labels-2j0acCTvBWM) on Unsplash
