Skip to main content

VulnTrain

Latest release License PyPi version

VulnTrain turns the vulnerability data collected by Vulnerability-Lookup into AI datasets and trained models. It processes over one million advisory records (CVE, GitHub advisories, CSAF, PySecDB, CNVD, FSTEC) to answer questions such as:

  • How severe is this vulnerability, given only its description?
  • Which CWE does this patch fix?
  • Which MITRE ATT&CK techniques does this CVE enable?

All resulting datasets and models are published on Hugging Face:

Model on HF

Installation

pipx install VulnTrain

For development:

git clone https://github.com/vulnerability-lookup/VulnTrain.git
cd VulnTrain/
poetry install

Documentation

Full documentation — configuration, dataset generation, training recipes and methodology — is available at https://vulnerability-lookup.github.io/VulnTrain

For more information about the use of AI in Vulnerability-Lookup, please refer to the user manual.

Usage

Every task follows the same three stages, each with its own command.

1. Build a dataset from the vulnerability sources and push it to the Hub:

vulntrain-dataset-generation --sources cvelistv5,github,csaf_redhat,pysec \
  --repo-id CIRCL/vulnerability-scores

2. Train a model on that dataset (trainers push to the Hub by default; use --no-push for a local run):

vulntrain-train-severity-classification --base-model roberta-base \
  --dataset-id CIRCL/vulnerability-scores \
  --repo-id CIRCL/vulnerability-severity-classification-roberta-base

3. Validate the trained model:

vulntrain-validate-severity-classification

Available tasks

Task Train with Published model
Severity classification vulntrain-train-severity-classification …severity-classification-roberta-base
Severity classification (Chinese, CNVD) vulntrain-train-severity-cnvd-classification …severity-classification-chinese-macbert-base
CWE classification from patches vulntrain-train-cwe-classification …cwe-classification-modernbert-base
CVE → ATT&CK techniques vulntrain-train-attack-classification …attack-technique-classification-roberta-base
CVE → ATT&CK techniques (bi-encoder) vulntrain-train-attack-biencoder …attack-technique-biencoder
Description generation vulntrain-train-description-generation …description-generation-gpt2*

Every command accepts --help. The exact command lines used to regenerate each published artifact are in the runbook.

How to cite

For the severity classification work:

Bonhomme, C., & Dulaunoy, A. (2025). VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification (Version 1.4.0) [Computer software]. https://doi.org/10.48550/arXiv.2507.03607

@misc{bonhomme2025vlai,
    title={VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification},
    author={Cédric Bonhomme and Alexandre Dulaunoy},
    year={2025},
    eprint={2507.03607},
    archivePrefix={arXiv},
    primaryClass={cs.CR}
}

For the ATT&CK technique mapping work:

Bonhomme, C., & Dulaunoy, A. (2026). Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion. https://doi.org/10.48550/arXiv.2607.25572

@misc{bonhomme2026mappingcvesmitreattck,
    title={Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion},
    author={Cédric Bonhomme and Alexandre Dulaunoy},
    year={2026},
    eprint={2607.25572},
    archivePrefix={arXiv},
    primaryClass={cs.CR},
    url={https://arxiv.org/abs/2607.25572},
}

License

VulnTrain is licensed under GNU General Public License version 3

Copyright (c) 2025-2026 Computer Incident Response Center Luxembourg (CIRCL)
Copyright (C) 2025-2026 Cédric Bonhomme - https://github.com/cedricbonhomme
Copyright (C) 2025 Léa Ulusan - https://github.com/3LS3-1F

Funding

AIPITCH (AI-Powered Innovative Toolkit for Cybersecurity Hubs) is a co-funded EU project supported by the European Cybersecurity Competence Centre (ECCC) under the DIGITAL-ECCC-2024-DEPLOY-CYBER-06-ENABLINGTECH program and CIRCL.

The project brings together an international consortium to develop AI-based tools that enhance the capabilities of operational cybersecurity teams. These tools are designed to support critical services, with a focus on national security teams, while also being applicable to internal security teams in companies and institutions.

Metadata

Release files for VulnTrain 3.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VulnTrain 3.5.0
File Size Uploaded Provenance Actions
vulntrain-3.5.0.tar.gz 107.9 kB With provenance Details for vulntrain-3.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for VulnTrain 3.5.0
File Interpreter ABI Platform Actions
vulntrain-3.5.0-py3-none-any.whl Python 3 none any Details for vulntrain-3.5.0-py3-none-any.whl

Total release size: 242.4 kB

Release files / vulntrain-3.5.0.tar.gz

Download URL vulntrain-3.5.0.tar.gz
Size 107.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9fc3d3ddd1f9a183e6136023e2cb6c505a260a5b79e6f74e83c65076ee9ebee3
BLAKE2b-256 checksum
How to use checksums
68874f6ed8abb431fb07c9b33a169fe7a9e3dd7d4f7c8cf13e7e8a9f19a847fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / vulntrain-3.5.0-py3-none-any.whl

Download URL vulntrain-3.5.0-py3-none-any.whl
Size 134.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a25b1fd40f775c25997333ad156b74f7655836730a7563eb598638bde23a72f4
BLAKE2b-256 checksum
How to use checksums
de8bafe156720583066e8a86ab6856ce94dd93d3bc1072b1c41f14ea7a51e07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for VulnTrain 3.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vulntrain-3.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page