LineageForge: Large Language Model for Constructing Verifiable Smart Contract Vulnerability Datasets at Scale
Abstract
LineageForge leverages large language models to construct large-scale, verifiable smart contract vulnerability datasets from real-world exploited vulnerabilities, pairing protected and vulnerable contracts with executable proofs.
Smart contract vulnerabilities pose serious security risks to decentralized applications. Given that deployed smart contract code is generally immutable, detecting vulnerabilities before deployment is crucial. Smart Contract Vulnerability (SCV) datasets play a key role in developing and evaluating vulnerability detection tools. Existing SCV datasets are commonly constructed through tool-based labeling, manual curation, or predefined vulnerability injection. However, these approaches face three key challenges: First, vulnerability samples often lack traceable origins in real-world security incidents. Second, ground-truth labels often lack empirical validation. Third, the number of instances per vulnerability type remains limited even when both provenance and validation are available. To address these challenges, we present LineageForge, a framework that leverages Large Language Models (LLMs) to construct verifiable SCV datasets at scale from vulnerabilities exploited in real-world attacks. LineageForge consists of two modules: 1) The incident-guided discovery module identifies compatible contracts whose business logic supports the target vulnerability and collects supporting source evidence. 2) Guided by this evidence, the Evidence-Grounded Contract Construction (EGCC) module constructs a protected contract free of the target vulnerability and derives its vulnerable counterpart through targeted code changes. EGCC then adapts and executes the attack against both versions. Based on seven real-world incidents, LineageForge produces 1,059 validated instances, each pairing a protected contract with its vulnerable counterpart and providing executable proofs of concept and the execution environment for reproducible verification. LineageForge is available at https://github.com/youfafa/lineageforge-dataset.
Get this paper in your agent:
hf papers read 2611.37105 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper