Datasets:
metadata
license: gpl-3.0
task_categories:
- text-generation
- code-generation
language:
- code
size_categories:
- 10K<n<100K
pretty_name: MegaVul (CVEfixes Format)
tags:
- security
- vulnerabilities
- code-analysis
- cve
MegaVul Dataset (CVEfixes-Compatible Format)
Dataset Description
This is a processed version of the MegaVul dataset converted to match the CVEfixes schema format for unified vulnerability analysis and model training.
Source Kaggle Dataset: marcdamie/megavul-a-cc-java-vulnerability-dataset Original Project: Icyrockton/MegaVul
Dataset Summary
MegaVul is a large, high-quality, extensible, continuously updated C/C++/Java function-level vulnerability dataset.
This processed version provides:
- 671,797 vulnerability records
- 8,476 unique CVEs
- 9,284 unique repositories
- CVEfixes-compatible schema for combined training
Languages
| Language | Count | Percentage |
|---|---|---|
| C | 538269 | 80.1% |
| C++ | 133528 | 19.9% |
Dataset Structure
See the project's megavul_dataset_loader.py for full schema details.
Source Data
Original Dataset
This dataset is derived from the MegaVul project.
- Original Repository: https://github.com/Icyrockton/MegaVul
- Academic Paper: MegaVul: A C/C++ Vulnerability Dataset with Comprehensive Code Representations
- License: GPL-3.0
Data Collection
This dataset was created by:
- Downloading the version of the dataset from Kaggle.
- Converting it to the CVEfixes commit-level schema.
- Generating synthetic commit hashes and other metadata.
Licensing & Attribution
License
This dataset is licensed under GPL-3.0 to match the original MegaVul license.
Citation
If you use this dataset, please cite the original MegaVul paper:
@inproceedings{megavul2024,
title={MegaVul: A C/C++ Vulnerability Dataset with Comprehensive Code Representations},
author={Chen Ni and Zhuo Xu and Yun Zhang and Yang Liu and others},
booktitle={Proceedings of the 21st International Conference on Mining Software Repositories},
year={2024},
publisher={ACM}
}
And acknowledge this processed version:
@misc{hitoshura25_megavul,
title={MegaVul Dataset in CVEfixes Format},
author={Your Name},
year={2025},
howpublished={\url{https://huggingface.co/datasets/hitoshura25/megavul}},
note={Processed from the Kaggle dataset by Marc Damie, based on the original MegaVul project.}
}
Usage
from datasets import load_dataset
dataset = load_dataset("hitoshura25/megavul")