arXiv:2610.24297cs.LGOct 2026

Manuscript Offprint

arXiv:2610.24297

Predicting CVSS and CWE from CVE Descriptions with Fine-Tuned Small Language Models

Tara Dixit, Jessie Dong, Summer Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Until April 2026, the National Vulnerability Database labeled nearly every published Common Vulnerabilities and Exposures (CVE) entry with a Common Vulnerability Scoring System (CVSS) v3.1 vector, a severity tier, and a Common Weakness Enumeration (CWE) weakness type. Now, NIST enriches only the high priority CVEs, leaving many newly published vulnerabilities unlabelled with the classifiers that security teams use for patch triage. In CVE enrichment, we predict the eight base components of CVSS v3.1 vector, base score, severity tier, and CWE from the vulnerability's textual description alone. To prevent leakage between near-duplicate descriptions, all systems are trained only on CVEs published in 2022 and 2023. Results are evaluated on all 36,325 usable 2024 CVEs in the pinned NVD snapshot. All scores are either directly predicted, or calculated from predicted vectors using the CVSS formula. A fine-tuned 3.8B-parameter model Phi-3.5-mini, trained with LoRA in 2.5 hours on a single Apple M5 Pro chip, achieves 69.9% accuracy on severity and 70.9% on CWE. It matches the official vector exactly for 48.8% of test CVEs, outperforming TF-IDF logistic regression by 2.8 to 4.7 points on all accuracy metrics based on zero-exclusion paired bootstrap intervals. When we evaluate the base model with a zero-shot prompt, it achieves 20.8% accuracy on severity in a sample of 2,000 CVEs. In this same sample, its stated scores match its own vector precisely for only 3.4% of CVEs. However, deriving scores from predicted vectors boosts the critical recall of TF-IDF logistic regression from 50.7% to 73.3% with no additional cost. And since the errors of the fine-tuned model and TF-IDF affect different CVEs, at least one system matches the correct severity tier for 75.8% of test CVEs.

1 Introduction

Knowing the severity of a vulnerability and the kind of security property it violates allows one to triage the vulnerabilities to which their software is susceptible, and prioritize patches accordingly. For example, suppose one is interested in whether their software is vulnerable to buffer overflows, as in the figure on the left. The Common Weakness Enumeration (CWE) assigns each weakness a unique CWE-ID (e.g., CWE-120) and groups related CWEs hierarchically (e.g., buffer overflow weaknesses such as CWE-120 and CWE-787 are children of CWE-119), which one could leverage to answer this question. Alternatively, suppose that one only wants to patch vulnerabilities that could lead to remote code execution

Figure

Figure 1: Two CVE descriptions from the 2024 test set and the labels NIST assigned to them. Left: an out-of-bounds write, CWE-787, which the CWE hierarchy places under the buffer-overflow class CWE-119. Right: a use-after-free in Chrome that is exploitable over the network once a user opens a crafted page.

(RCE) from untrusted websites, as in the figure on the right. The Common Vulnerability Scoring System (CVSS) provides eight components to quantify how a vulnerability is exploited and its impact on Confidentiality, Integrity, and Availability (e.g., the Network Attack Vector component in the figure, meaning remotely exploitable), and combines these components into a single base score in [0, 10] and a severity tier to ease triage. 1^{1} These enrichments for Common Vulnerabilities and Exposures (CVE) 2^{2} identifiers are assigned by humans at the National Vulnerability Database (NVD) maintained by the National Institute of Standards and Technology (NIST). However, due to not being able to keep up with the number of new vulnerability disclosures, a CVE backlog arose in early 2024. As such, as of 15 April 2026, NIST will enrich only CVEs present in CISA’s Known Exploited Vulnerabilities (KEV) catalog or affecting US Federal government or Executive Order (EO) 14028 critical software, and mark others as “Lowest Priority – not scheduled for immediate enrichment” (National Institute of Standards and Technology, 2026). Consequently, it is important to study automated CVE enrichment.

In this paper, we pose CVE enrichment as the task of predicting the eight CVSS v3.1 3^{3} components (FIRST, 2019) shown in Figure 1, as well as the CVSS score, severity tier, and CWE from only a text description of the vulnerability. We consider CVEs from the last three years 4^{4} from the National Vulnerability Database, since CVEs recur, so training/test splits should account for time and train on older CVEs to avoid leakage. Specifically, within a pinned NVD release, we train on the CVEs from 2022 and 2023, and test on the 36,325 usable 5^{5} 2024 CVEs.

CVE enrichment. Given only the text description of a CVE vulnerability disclosure, recover its CVSS vector and thereby its CVSS score and severity tier, as well as its CWE.

We make the following contributions:

• Temporal benchmark for CVE enrichment. We release a temporal benchmark for CVE enrichment free from leakage issues, based on a pinned snapshot of the NVD and validated with a reference CVSS calculator implementation. We acknowledge that our choice of ground truth, the NVD’s vectors, are themselves the products of fallible human judgment: NVD analysts can and do disagree about correct vectors, reporting

1^{1}The eight components and score determine severity: ≤\leq3.9 LOW, ≤\leq6.9 MEDIUM, ≤\leq8.9 HIGH, else CRITICAL.

2^{2}https://www.cve.org

3^{3}Common Vulnerability Scoring System version 3.1.

4^{4}Of the NVD records that were not rejected, 94.4% of 2024 CVEs meet our inclusion criteria, against 90.7% for 2023 and 85.9% for 2022.

5^{5}Usable meaning containing required text description, enrichment ground truths, and having a CVSS v3.x (v3.0 or v3.1) base score.

organizations can assign different scores to the same vulnerabilities, and NVD labels are revised after the fact. But without consensus there’s no dataset, and by pinning a snapshot, at least our reported numbers won’t change under us.

• CVSS/CWE Benchmark. We evaluate the effectiveness of (1) TF-IDF features with linear classification/regression, (2) a 3.8B-parameter Phi-3.5-mini LLM zero-shot, and (3) Phi-3.5-mini fine-tuned with LoRA at predicting (a) the eight CVSS components and deriving the score/severity from these, or (b) the CVSS score and CWE directly. We find that the fine-tuned Phi-3.5-mini achieves the best severity tier accuracy of the systems we evaluate, 69.9%, 6^{6} and CWE accuracy of 70.9%. It matches the exact CVSS vector for 48.8% of test CVEs and outperforms the TF-IDF logistic regression baseline by +2.8 to +4.7 points across tasks (* statistically significantly w/ paired bootstrap resampling, intervals in Appendix D do not contain 0). We also find that the fine-tuned model and the TF-IDF baseline complement one another, erring on different CVEs: at least one gets severity correct for 75.8% of test CVEs. We provide more results and discuss insights, error cases, and implications in Sections 3 and 4.

• Previous Work. Earlier works have used bag-of-words representations with linear models to predict CVSS components and score (Elbaz et al., 2020), BERT to predict CVSS components (Shahid and Debar, 2021), RoBERTa to predict tier (Bonhomme and Dulaunoy, 2025), and bag-of-words with random forests (Aota et al., 2020) or RoBERTa (Mosievskiy, 2026) to predict CWE. Our benchmark expands this prior work by considering a strict temporal split, more recent LLMs, and joint prediction of CVSS and CWE. We provide more related work in Section 5.

• Reproducible Code & Artifacts. We release our configs 7^{7} and per-CVE predictions. 8^{8} Our code regenerates all numbers in this work given an NVD release; we use release v2026.10.05-000016. 9^{9}

References (30)