File size: 3,222 Bytes
ed6777f
 
 
 
 
 
 
 
 
 
 
9e1d85a
ed6777f
 
 
 
 
9e1d85a
ed6777f
9e1d85a
ed6777f
 
 
9e1d85a
 
 
 
 
 
 
 
 
 
 
 
 
ed6777f
 
 
 
 
 
 
 
 
 
9e1d85a
ed6777f
9e1d85a
ed6777f
9e1d85a
ed6777f
9e1d85a
ed6777f
9e1d85a
 
ed6777f
 
 
9e1d85a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
license: apache-2.0
base_model: cisco-ai/SecureBERT2.0-base
pipeline_tag: text-classification
library_name: transformers
language: [en]
tags: [cve, vulnerability, cvss, severity, security, vulnerability-management, triage, nvd, onnx, transformers.js]
model-index:
- name: cve-severity-classifier
  results:
  - task: {type: text-classification, name: CVSS 3.1 severity band from CVE description}
    dataset: {type: cve-list-v5-from-2026-08, name: CVE List V5, CVEs published from 2026-08-01 (n=45772)}
    metrics:
    - {type: accuracy, value: 0.664, name: severity band accuracy}
inference: false
---

# cve-severity-classifier

Predict the **CVSS 3.1 severity band** of a CVE from its text description: `LOW` (< 4.0), `MEDIUM` (4.0-6.9), `HIGH` (7.0-8.9), `CRITICAL` (>= 9.0). It is a standard `text-classification` model, so it drops into a `transformers` pipeline, and it gives a severity hint before a CVSS score exists. It beats CIRCL's severity model (revision 2026-03-30) by 3.4 points of accuracy.

**[Try it in your browser](https://huggingface.co/spaces/Project-Bastion/cve-severity-classifier-demo)**: a static page that runs the model locally (transformers.js, ONNX; 152 MB int8 by default, 599 MB fp32 optional). The text you paste never leaves your device.

## Results

CVE List V5, CVEs published from 2026-08-01 with a CVSS 3.1 vector (n = 45,772). One number per cell: the score on that benchmark.

| System | Severity band accuracy |
|---|---|
| **cve-severity-classifier** | **0.664** |
| CIRCL/vulnerability-severity-classification-roberta-base (revision 2026-03-30) | 0.630 |
| TF-IDF + linear SVM | 0.608 |
| Majority class | 0.406 |

The target is the band of the CVSS 3.1 base score computed from the vector recorded for each CVE.

## Usage

```python
from transformers import pipeline
clf = pipeline("text-classification", model="Project-Bastion/cve-severity-classifier", top_k=None)
desc = ("A stack-based buffer overflow in the HTTP request parser of ExampleServer before 2.4.1 allows remote "
        "unauthenticated attackers to execute arbitrary code via a long Host header.")
print(clf(desc, truncation=True, max_length=160))   # [[{'label': 'CRITICAL', 'score': ...}, {'label': 'HIGH', ...}, ...]]
```

Input: the English CVE description, up to 160 tokens. These are the weights of the severity head of [Project-Bastion/cve-triage](https://huggingface.co/Project-Bastion/cve-triage), which also predicts CWE and CVSS components.

## Files

`onnx/model.onnx` (fp32, 599 MB) and `onnx/model_quantized.onnx` (weight-only int8, 151 MB, the demo default) for transformers.js / onnxruntime. int8 keeps the top class for 99.0% of descriptions; use fp32 for exact agreement with PyTorch.

## Limits

* A severity hint, not an official score: scoring differs between CVE numbering authorities.
* English descriptions only; no exploitability, environment or CVSS 4.0 information.

## License and credits

Apache-2.0. Base model: cisco-ai/SecureBERT2.0-base (Apache-2.0). Data: the CVE List (cvelistV5) used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation; CVE content copyright © The MITRE Corporation. CIRCL's model (CC-BY-4.0) is the baseline.