On Predicting Vulnerability Severity Using In‐Context Learning: An Industrial Case Study
Open Access
- 2 June 2026
- journal article
- Published by Wiley in Journal of Software: Evolution and Process
- Vol. 38 (6)
Abstract
Modern software systems require earlier and more scalable vulnerability severity assessment to reduce exposure to high‐impact security flaws. Security analysts typically assign CVSS scores, but this manual triage does not scale with the growth of disclosed vulnerabilities and often depends on cloud LLM services that raise confidentiality concerns. This paper presents an industrial case study on predicting CVSS v3.1 scores directly from vulnerable C/C++ snippets using in‐context learning with locally deployable, open‐source LLMs. We compare Propietary data with the Big‐Vul dataset, showing sufficiently aligned CVSS distributions to justify Big‐Vul as a proxy for industrial data when constructing prompt‐based testbeds. We then vary in‐context configurations and model parameters, evaluating CodeLlama2‐7B , CodeLlama2‐13B , Mistral‐7B , gpt‐oss , and GPT4o‐mini using mean squared error (MSE) and feasibility metrics. Our results show that medium‐sized open‐source code models, particularly CodeLlama2‐7B , can approximate the best cloud performance for CVSS regression when guided by lightweight, output‐constraining prompts, offering a practical, privacy‐preserving building block for severity triage in industrial settings.Keywords
All Related Versions
This publication has 22 references indexed in Scilit:
- Can LLMs Classify CVEs? Investigating LLMs Capabilities in Computing CVSS Vectors2025
- Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability DetectionProceedings of the ACM on Software Engineering, 2025
- Survey of source code vulnerability analysis based on deep learningComputers & Security, 2024
- Software Vulnerability Detection with GPT and In-Context Learning2023
- LineVul2022
- Vulnerability detection with fine-grained interpretations2021
- Exploit Prediction Scoring System (EPSS)Digital Threats: Research and Practice, 2021
- A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries2020
- XGBoost2016
- Beyond heuristics2010