Trained on CVEs from 2016–2023. Tested on a held-out 2025 split (temporal, never seen during training).
PR (Privileges Required) and C/I/A (Impact) are the hardest components — advisory text rarely
encodes privilege context or impact scope explicitly.
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3tokenizer = AutoTokenizer.from_pretrained("harinpurumandla/cve-severity-net")
4model = AutoModelForSeq2SeqLM.from_pretrained("harinpurumandla/cve-severity-net")
5
6description = "A heap-based buffer overflow allows unauthenticated remote code execution."
7inputs = tokenizer(
8 "predict cvss vector: " + description,
9 return_tensors="pt",
10 truncation=True,
11 max_length=512,
12)
13outputs = model.generate(**inputs, num_beams=4, max_new_tokens=48)
14print(tokenizer.decode(outputs[0], skip_special_tokens=True))
15# AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H