CoolFace
Datasetpublic

auren-research/cve-sft-v5

CVE SFT Dataset v5 CVE SFT Dataset v5 is a structured instruction-following dataset for fine-tuning language models on cybersecurity vulnerability analysis. Built by Auren Research, it combines authoritative vulnerability metadata from the NIST National Vulnerability Database (NVD) with five generated fields that teach models to explain, reason about, and remediate real-world CVEs — including side-by-side vulnerable vs. safe code examples. Unlike most security… See the full description on the dataset page: https://huggingface.co/datasets/auren-research/cve-sft-v5.

sourceHugging Facecc-by-4.0updated 4mo agoView on Hugging Face
7likes105downloads
Dataset Card

CVE SFT Dataset v5

<p align="center"> <img src="https://img.shields.io/badge/Records-10%2C000-blue" alt="10,000 Records"> <img src="https://img.shields.io/badge/Source-NVD%2FNIST-orange" alt="NVD/NIST"> <img src="https://img.shields.io/badge/Fields-12-green" alt="12 Fields"> <img src="https://img.shields.io/badge/License-CC--BY--4.0-lightgrey" alt="CC BY 4.0"> <img src="https://img.shields.io/badge/Task-SFT%20%2F%20Fine--Tuning-purple" alt="SFT"> </p>

CVE SFT Dataset v5 is a structured instruction-following dataset for fine-tuning language models on cybersecurity vulnerability analysis. Built by Auren Research, it combines authoritative vulnerability metadata from the NIST National Vulnerability Database (NVD) with five generated fields that teach models to explain, reason about, and remediate real-world CVEs — including side-by-side vulnerable vs. safe code examples.

Unlike most security datasets that provide only raw CVE descriptions and CVSS scores, this dataset trains models to produce structured, actionable security intelligence: attack scenarios, root cause analysis, and concrete remediation steps with validation.


Why This Dataset

Security-focused LLMs face a consistent gap: they can recite CVE descriptions but struggle to reason about exploitation paths, explain root causes to non-experts, or generate accurate remediation guidance. This dataset directly addresses that gap by providing:

  • Plain-language explanations accessible to non-security audiences
  • Technical deep dives covering root cause, impact, and attack context
  • Attack scenarios structured as recon → execution → objective
  • Remediation guidance with immediate fix + 3 additional mitigations + validation steps
  • Vulnerable vs. safe code pairs — the most requested and rarest field in open security datasets

This dataset was built by a researcher with hands-on vulnerability research experience, including reported findings on HackerOne across blockchain and smart contract targets.


Dataset Statistics

AttributeValue
Total records10,000
Columns12
Source (metadata)NIST NVD
Source (generated fields)LLM-generated, curated
LanguageEnglish
FormatParquet
LicenseCC BY 4.0

Severity Distribution

SeverityCVSS RangeCountPercentage
Critical9.0 – 10.09829.8%
High7.0 – 8.93,73537.4%
Medium4.0 – 6.94,13141.3%
Low0.1 – 3.94394.4%
No score7137.1%

Top 10 CWE Categories

RankCWETypeCount
1CWE-79Cross-Site Scripting (XSS)913
2CWE-OtherMiscellaneous684
3CWE-22Path Traversal381
4CWE-862Missing Authorization344
5CWE-89SQL Injection336
6CWE-74Injection (general)320
7CWE-416Use-After-Free304
8CWE-918Server-Side Request Forgery272
9CWE-77Command Injection240
10CWE-20Improper Input Validation225

Dataset Schema

ColumnSourceDescriptionAvg Length
cve_idNVDCVE identifier (e.g. CVE-2026-33980)
published_dateNVDPublication date
cvss_scoreNVDCVSS score (0.0 – 10.0)
cvss_vectorNVDFull CVSS vector string (e.g. AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
cwe_idNVDWeakness category (e.g. CWE-79, CWE-89)
affected_softwareNVDAffected product/vendor
affected_versionsNVDVulnerable version range
plain_explanationGeneratedAccessible English explanation of the vulnerability~697 chars
technical_deep_diveGeneratedRoot cause + impact + technical context~267 chars
attack_scenarioGeneratedStructured attack path: recon → execution → objective~271 chars
remediationGeneratedImmediate fix + 3 additional mitigations + validation~433 chars
vulnerable_code_exampleGeneratedSide-by-side vulnerable and safe code in the affected language~664 chars

Data Quality

Deduplication was performed on all generated fields. Results:

FieldExact DuplicatesRateGrade
plain_explanation00.0%Excellent
remediation40.0%Excellent
attack_scenario610.6%Excellent
technical_deep_dive1601.6%Good
vulnerable_code_example1821.8%Good

The low duplication rates — particularly 0% on plain_explanation and near-zero on remediation — indicate the generated content is genuinely diverse and not template-collapsed.


Usage

python
from datasets import load_dataset
import pandas as pd

# Load via HuggingFace datasets
ds = load_dataset("auren-research/cve-sft-v5", split="train")

# Or load directly from parquet
df = pd.read_parquet("cve_sft_dataset_v5.parquet")

# Example: filter critical CVEs with code examples
critical = df[
    (df["cvss_score"] >= 9.0) &
    (df["vulnerable_code_example"].str.len() > 100)
]
print(f"Critical CVEs with code examples: {len(critical)}")

# Example: inspect a single record
row = df.iloc[0]
print(f"CVE: {row['cve_id']}")
print(f"CVSS: {row['cvss_score']} | CWE: {row['cwe_id']}")
print(f"\nPlain explanation:\n{row['plain_explanation']}")
print(f"\nAttack scenario:\n{row['attack_scenario']}")
print(f"\nRemediation:\n{row['remediation']}")

SFT Training Example

python
def format_for_sft(row):
    """Format a CVE record as an instruction-following example."""
    instruction = (
        f"Analyze the following vulnerability: {row['cve_id']}\n"
        f"Affected software: {row['affected_software']}\n"
        f"CVSS Score: {row['cvss_score']} | CWE: {row['cwe_id']}\n"
        f"CVSS Vector: {row['cvss_vector']}"
    )
    response = (
        f"## Plain Explanation\n{row['plain_explanation']}\n\n"
        f"## Technical Deep Dive\n{row['technical_deep_dive']}\n\n"
        f"## Attack Scenario\n{row['attack_scenario']}\n\n"
        f"## Remediation\n{row['remediation']}\n\n"
        f"## Code Example\n{row['vulnerable_code_example']}"
    )
    return {"instruction": instruction, "response": response}

df["formatted"] = df.apply(format_for_sft, axis=1)

Intended Use Cases

  • Fine-tuning security-focused LLMs on structured vulnerability reasoning
  • Training code security assistants using the vulnerable/safe code pairs
  • Security education — teaching developers to recognize and fix common vulnerability patterns
  • Red team tooling — grounding LLM-based recon and exploitation reasoning in real CVE data
  • Benchmarking LLM security knowledge across CWE categories and severity levels
  • RAG pipelines for security operations centers (SOC) and vulnerability management platforms

Limitations

  • Generated fields are LLM-produced and have not been manually reviewed by security researchers for every record. A small number of records (~2%) may contain templated or lower-quality outputs in technical_deep_dive and vulnerable_code_example
  • Code examples are illustrative and may not exactly reproduce the specific CVE's vulnerable codebase — they demonstrate the vulnerability class, not the exact affected code
  • Attack scenarios are structured for educational purposes and intentionally omit weaponizable exploit details
  • Coverage bias: the dataset reflects NVD publication patterns — CWE-79 (XSS) is heavily represented because it is the most commonly reported vulnerability class
  • Version coverage: records use NVD data as of v5 build date — newer CVEs are not included

Ethical Considerations

This dataset is intended for defensive security use cases: training models that help developers write safer code, security teams triage vulnerabilities faster, and organizations understand their exposure.

The attack scenarios are structured at a conceptual level (recon → execution → objective) and do not include weaponized exploit code, working proof-of-concept payloads, or specific bypass techniques for active CVEs.

Users should not use this dataset to build tools that automate offensive exploitation of unpatched systems.


Citation

bibtex
@dataset{auren2026cvesft,
  title   = {CVE SFT Dataset v5: Structured Vulnerability Intelligence for LLM Fine-Tuning},
  author  = {Francisco Antonio Da Costa Barroso},
  year    = {2026},
  publisher = {Auren Research},
  url     = {https://huggingface.co/datasets/auren-research/cve-sft-v5}
}

Related Work from Auren Research

  • [PII Shield](https://huggingface.co/datasets/auren-research/pii-shield) — 3.1M+ multilingual PII detection examples across 6 languages
  • [Lunaris Guard](https://huggingface.co/auren-research/lunaris-guard) — Dual-head multilingual safety classifier (ROC-AUC 0.979 on prompt injection)
  • [Lunaris MoC](https://github.com/Auren-Research/lunaris) — Novel sparse Transformer architecture with mediator-based expert collaboration

Built by [Francisco Antonio Da Costa Barroso](https://github.com/MeryylleA) · Auren Research · 2026