regularpooria's picture
Update merged CVE-CWE dataset
c5cb406 verified
|
Raw History Blame Contribute Delete
3.35 kB
metadata
language:
  - en
tags:
  - cybersecurity
  - vulnerability
  - cve
  - nvd
  - cwe
  - software-security
task_categories:
  - text-classification
pretty_name: CVE-CWE Software Weakness Mapping Dataset
license: apache-2.0

CVE-CWE Software Weakness Mapping Dataset

Dataset description

This dataset merges two CVE-to-CWE data sources into a single table:

  • The original CVE-to-CWE mapping dataset from zefang-liu/cve-and-cwe-mapping-dataset, enriched with CWE descriptions and parent-category information from the scraped CWE-699 software hierarchy.
  • The NVD CVE records scraped by this project, resolved against the CWE-699 software hierarchy.

The two sources are joined on the CVE identifier. Variables shared by both sources are matched onto a single column; variables that exist in only one source are kept as separate columns and left empty for rows coming from the other source.

Dataset structure

The dataset is provided as CVE_CWE_Dataset.csv.

Variables shared by both sources:

  • CVE-ID: CVE identifier (join key).
  • YEAR: year the CVE was published.
  • CVE-DESCRIPTION: vulnerability description.
  • CVE-DESCRIPTION-NORMALIZED: normalized vulnerability description.
  • CWE-ID: associated CWE identifier(s), pipe separated.
  • CWE-DESCRIPTION: description of the associated weakness (pipe separated for multiple CWEs).
  • IS-IN-CWE699: whether the CWE belongs to the CWE-699 Software category.

Variables from the original (zefang-liu) dataset only:

  • PARENTS: parent CWE category or categories.
  • CVSS-V3: CVSS v3 score.
  • CVSS-V2: CVSS v2 score.
  • SEVERITY: severity rating.
  • ID: identifier from the original dataset.

Variables from the NVD dataset only:

  • published: publication timestamp.
  • last_modified: last modification timestamp.
  • all_nvd_cwes: all CWE identifiers NVD associates with the CVE (pipe separated).
  • number_of_nvd_cwes: count of all_nvd_cwes.
  • number_of_cwe_699_matches: count of CWE-ID.
  • true_children: the CWE-699 child ids from CWE-ID that exist in CWE_SOFTWARE.json (list).
  • true_categories: the CWE-699 category ids those children belong to (sorted list).

Data sources

  • CVE-to-CWE mappings and vulnerability descriptions are sourced from the zefang-liu/cve-and-cwe-mapping-dataset dataset on Hugging Face.
  • Raw CVE records are collected from the NVD.
  • CWE descriptions, hierarchy and CWE-699 Software category membership are collected from the CWE data scraped by this project.

The dataset is generated by dataset/merge_datasets.ipynb.

Intended uses

This dataset is intended for research and experimentation involving:

  • CVE-to-CWE classification.
  • Vulnerability search and retrieval.
  • Security text embedding and similarity experiments.
  • Analysis of software weakness categories.

Limitations

The mappings reflect the upstream NVD, CVE and CWE data and may contain incomplete, ambiguous, or changing vulnerability information. The dataset should not be treated as a definitive security assessment or as a replacement for reviewing the original NVD and CWE records.

License and attribution

Please review and follow the licenses and attribution requirements of the upstream NVD, CVE and CWE sources before redistributing or using this dataset.