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.

Rows of wooden library card catalogue drawers with metal label holders, receding into soft focus
Photo by Ilya Semenov on Unsplash

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. How ADP containers work in general is in CVE ADP containers: CISA-ADP, CVE Program and supplier ADPs.

The problemTypes structure

The CVE Record Format schema (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:

PropertyRequiredSchema constraintWhat it holds
langyeslanguage tagen, en-US
descriptionyesstring, 1-4096 chars“Text description of problemType, or title from CWE or OWASP.”
cweIdno^CWE-[1-9][0-9]*$, 5-9 chars“CWE ID of the CWE that best describes this problemType entry.”
typenofree string, 1-128 chars“Problemtype source, text, OWASP, CWE, etc.,”
referencesnoreferences arraysupporting links

A well-formed CNA entry:

"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 (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 yearPublished recordsCNA cweIdCNA text onlyNo problemTypesNo cweId anywhere (CNA or CISA-ADP)
202439,92425,623 (64.2%)9,054 (22.7%)5,247 (13.1%)5,366 (13.4%)
202548,15034,764 (72.2%)6,982 (14.5%)6,404 (13.3%)5,626 (11.7%)
2026 (to Nov 15)97,70974,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 recordsPatternExample
Linux8,262no problemTypes in any 2026 recordCVE-2026-74687
oracle4,154all text only (risk sentence such as “Easily exploitable vulnerability allows …”)CVE-2026-82997
mitre3,7733,027 text-only, description n/aCVE-2026-104586
WPScan2,314CWE named in text with type: "CWE", no cweId (2,312 records)CVE-2026-82126
apple1,196all text onlyCVE-2026-86917
Chrome3,972705 text-only (labels such as “Inappropriate implementation”)CVE-2026-106484
mozilla968no problemTypes in any 2026 record

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

{ "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 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 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:

CWERecordsCWE mapping note
CWE-284 Improper Access Control3,334Pillar; usage DISCOURAGED
CWE-200 Exposure of Sensitive Information975
CWE-79 Cross-site Scripting829
CWE-269 Improper Privilege Management717
CWE-416 Use After Free696

CWE-284’s own definition page (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:

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:

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, 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, CISA’s SSVC values and KEV.

How MITRE’s Top 25 deals with the same data

The 2025 CWE Top 25 methodology 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 claimSourceStatus
problemTypes structure, cweId pattern, CNA required fieldsCVE Record Format schemaVerified
CNA MUST identify vulnerability type; SHOULD use CWE (rule 5.1.7)CNA Operational Rules 4.1.0Verified
CNA/ADP coverage counts, CNA patterns, CISA-ADP gap-fill countscvelistV5 release cve_2026-11-15_0000Z, counted with PythonVerified (our count)
CISA-ADP adds CWE for some CVEs, never overwrites CNA, drops on CNA update, CNA precedencecisagov/vulnrichment READMEVerified
CWE-284 is a Pillar with mapping usage DISCOURAGEDCWE-284 definitionVerified
Top 25 2025 dataset size, window and re-mapping share2025 CWE Top 25 methodologyVerified

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.

Vulnerability ManagementCweCve Json 5ProblemtypesCisa-AdpVulnrichmentCvelistv5Parsing