Automated Mapping of CVE Vulnerability Records to MITRE CWE Weaknesses

Ashraf Haddad, Najwa Aaraj, Preslav Nakov, Septimiu Fabian MarearXiv 2023

Abstract

In recent years, a proliferation of cyber-security threats and diversity has been on the rise, culminating in an increase in their reporting and analysis. To counter this, organizations like MITRE and OWASP have emerged to track vulnerabilities and publish defense recommendations in standardized formats. As manual data production is time-consuming, automation is necessary. However, a major obstacle to adopting supervised machine learning has been the lack of publicly available specialized datasets. This paper bridges this gap by focusing on mapping CVE records to MITRE CWE Weaknesses. We release a manually annotated dataset of 4,012 records and propose a human-in-the-loop framework treating the problem as a ranking task. Our results using fine-tuned deep learning models, specifically Sentence-BERT and rankT5, show significant performance gains over BM25, BERT, and RoBERTa, demonstrating the necessity of semantic understanding for this task.

Introduction

In cybersecurity, two standards are ubiquitous: CVE (Common Vulnerabilities and Exposures), which identifies specific software vulnerabilities, and CWE (Common Weakness Enumeration), which categorizes the underlying root causes. Mapping CVEs to CWEs is critical for risk assessment, yet it remains a manual bottleneck. Security experts must interpret unstructured text to select from hundreds of CWE categories—a process that is tedious and prone to inconsistency.

The core task: mapping unstructured CVE descriptions to structured CWE chains, including causation relationships.

Previous automation attempts have struggled due to a lack of high-quality training data and the complexity of "causation" chains, where one weakness leads to another. This research addresses these challenges by providing a robust dataset and a ranking-based modeling approach.

Methodology

We propose a human-in-the-loop framework designed to assist experts rather than replace them. By treating the problem as a ranking task, the system generates a prioritized list of likely CWEs for expert review.

The proposed framework for mapping vulnerability records to structured output using a ranking model and human feedback.

Key technical components include:

  • Ranking over Classification: Instead of simple multi-label classification, we use ranking to provide a more flexible tool for experts.
  • Modeling Causation: We explicitly account for "leads to" relationships (e.g., Improper Input Validation leading to an Out-of-bounds Write).
  • Deep Learning Architectures: We evaluated Transformer-based models, specifically Sentence-BERT (SBERT) for semantic similarity and rankT5 for sequence-to-sequence ranking, comparing them against traditional keyword-based baselines like BM25.

Dataset and Quality Control

A core contribution of this work is a new, manually annotated dataset derived from the National Vulnerability Database (NVD). It consists of 4,012 records, including 3,605 single-label records and 407 records capturing complex causation chains. The dataset underwent multiple rounds of expert review to resolve conflicts and correct "noisy" labels often found in existing databases, ensuring a high-quality ground truth for training.

Experimental Results

Our experiments demonstrate that fine-tuned semantic models significantly outperform keyword-based approaches:

  • SBERT (Fine-tuned): Achieved the highest performance with a Mean Reciprocal Rank (MRR) of 0.9142 and a MAP@1 of 0.8500.
  • rankT5 (Fine-tuned): Performed strongly with an MRR of 0.8155.
  • BM25 Baseline: The traditional keyword-based approach lagged significantly with an MRR of only 0.1514.

These results highlight that semantic understanding is mandatory; models must grasp the meaning of vulnerability descriptions rather than just matching keywords. Furthermore, domain-specific fine-tuning is essential, as SBERT’s MRR jumped from 0.63 to 0.91 after being trained on cybersecurity data.

Conclusion and Future Work

While this study successfully maps vulnerabilities to the "MITRE CWE Top 25," future work will involve expanding the scope to the full CWE catalog of over 900 types. We also plan to incorporate Reinforcement Learning from Human Feedback (RLHF) to allow the model to continuously improve based on expert corrections. This research provides a scalable path toward semi-automated, high-fidelity cyber threat intelligence.

Summary updated

BibTeX
@misc{haddad2023automated,
  author = {Ashraf Haddad and Najwa Aaraj and Preslav Nakov and Septimiu Fabian Mare},
  title = {{Automated Mapping of CVE Vulnerability Records to MITRE CWE Weaknesses}},
  year = {2023},
  eprint = {2304.11130},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.11130},
}
Figure