Datasets:

Modalities:
Text
Formats:
parquet
Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
12
19
title
stringlengths
0
237
description
stringlengths
35
3.87k
patches
listlengths
1
22
cwe
stringlengths
2
440
CVE-2021-23758
Deserialization of Untrusted Data
"All versions of package ajaxpro.2 are vulnerable to Deserialization of Untrusted Data due to the po(...TRUNCATED)
[{"commit_message":"[PATCH] added allowed customized types .gitignore (...TRUNCATED)
Deserialization of Untrusted Data
CVE-2022-4455
sproctor php-calendar index.php cross site scripting
"A vulnerability was identified in sproctor php-calendar up to 2.0.13. This impacts an unknown funct(...TRUNCATED)
[{"commit_message":"[PATCH] Attempt to mitigate reflective XSS attack index.php | 4 ++-- 1 file chan(...TRUNCATED)
Cross Site Scripting
GHSA-v5x8-2g8c-7279
null
[{"commit_message":"[PATCH] Bugfix: Possible SQL injection in nat/item-add-submit.php. Fixes #2344 a(...TRUNCATED)
null
GHSA-vxwr-wpjv-qjq7
XWiki Platform: Privilege escalation (PR) from user registration through PDFClass
null
[{"commit_message":"[PATCH] XWIKI-21337: Apply PDF templates with the rights of their authors (cherr(...TRUNCATED)
null
GHSA-hm2w-8xwc-gpv5
null
[{"commit_message":"[PATCH] Fix invalid free in RAnal.avr libr/anal/p/anal_avr.c | 2 +- 1 file chang(...TRUNCATED)
null
GHSA-9r4g-gmfh-6gxg
null
[{"commit_message":"[PATCH] Fix a reflected cross-site scripting vulnerability CVE-2022-1187 inc/adm(...TRUNCATED)
null
CVE-2022-24976
"Atheme IRC Services before 7.2.12, when used in conjunction with InspIRCd, allows authentication by(...TRUNCATED)
[{"commit_message":"[PATCH] saslserv/main: Track EID we're pending login to The existing model does (...TRUNCATED)
n/a
CVE-2014-125106
Nanopb before 0.3.1 allows size_t overflows in pb_dec_bytes and pb_dec_string.
[{"commit_message":"[PATCH] Protect against size_t overflows in pb_dec_bytes/pb_dec_string. Possible(...TRUNCATED)
n/a
GHSA-76p3-8jx3-jpfq
Prototype pollution in webpack loader-utils
null
[{"commit_message":"[PATCH] fix: security problem (#220) lib/parseQuery.js | 2 +- 1 file changed, 1 (...TRUNCATED)
null
GHSA-g44v-6qfm-f6ch
Answer has Guessable CAPTCHA
null
[{"commit_message":"[PATCH] update VerifyCaptcha internal/repo/captcha/captcha.go | 8 ++++(...TRUNCATED)
null
End of preview. Expand in Data Studio

Description

This dataset, CIRCL/vulnerability-cwe-patch, provides structured real-world vulnerabilities enriched with CWE identifiers and actual patches from platforms like GitHub and GitLab. It was built to support the development of tools for vulnerability classification, triage, and automated repair. Each entry includes metadata such as CVE/GHSA ID, a description, CWE categorization, and links to verified patch commits with associated diff content and commit messages.

The dataset is automatically extracted using a pipeline that fetches vulnerability records from several sources, filters out entries without patches, and verifies patch links for accessibility. Extracted patches are fetched, encoded in base64, and stored alongside commit messages for training and evaluation of ML models. Source Data

The dataset comprises 16,123 vulnerabilities and 18,810 associated patches. For training, we consider only those patches corresponding to vulnerabilities annotated with at least one CWE.

How to use with datasets

>>> import json
>>> from datasets import load_dataset

>>> dataset = load_dataset("CIRCL/vulnerability-cwe-patch")

>>> vulnerabilities = ["CVE-2025-60249", "CVE-2025-32413"]

>>> filtered_entries = dataset.filter(lambda elem: elem["id"] in vulnerabilities)

>>> for entry in filtered_entries["train"]:
...     print(entry["cwe"])
...     for patch in entry["patches"]:
...         print(f"  {patch['commit_message']}")
...
CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting')     
  [PATCH] fix: [security] Fixed a stored XSS vulnerability in user bios. Thanks to Dawid Czarnecki for reporting the issue.
CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting')
  [PATCH] fix: [security] sanitize user input in comments, bundles, and sightings - Escaped untrusted data in templates and tables to prevent XSS - Replaced unsafe innerHTML assignments with createElement/textContent - Encoded dynamic URLs using encodeURIComponent - Improved validation in Comment, Bundle, and Sighting models Credit: @Wachizungu

Schema

Each example contains:

- id: Vulnerability identifier (e.g., CVE-2023-XXXX, GHSA-XXXX)

- title: Human-readable title of the vulnerability

- description: Detailed vulnerability description

- patches: List of patch records, each with:

    url: Verified patch URL (GitHub/GitLab)

    patch_text_b64: Base64-encoded unified diff

    commit_message: Associated commit message

- cwe: List of CWE identifiers and names

The vulnerabilities can be sourced from:

- NVD CVE List — enriched with commit references

- GitHub Security Advisories (GHSA)

- GitLab advisories

- CSAF feeds from vendors including Red Hat, Cisco, and CISA

Use Cases

The dataset supports a range of security-focused machine learning tasks:

* Vulnerability classification

* CWE prediction from descriptions

* Patch generation from natural language

* Commit message understanding

Associated Code

The dataset is generated with the extraction pipeline from vulnerability-lookup/ML-Gateway, which includes logic for fetching, filtering, validating, and encoding patch data.

Downloads last month
77