Automated Vulnerability Injection in Smart Contracts Using Large Language Models
Not on the map. Why?
Abstract (arXiv)
Assessing vulnerability detection tools for smart contracts requires datasets with known ground truth, yet such datasets are scarce and difficult to build by hand. We propose an approach that uses Large Language Models (LLMs) to automatically inject vulnerabilities into Solidity smart contracts, and demonstrate it in a case study targeting 49 vulnerability types from OpenSCV. Injected contracts are validated through a multi-step pipeline checking compilation, execution, business logic, and the presence of the intended vulnerability. Applied to real-world contracts from SmartBugs, LLMs generate nearly 1,000 candidate variants; after deduplication and validation, 32 confirmed vulnerable contracts spanning 25 vulnerability types survive (a 16.58% survival rate). Surviving contracts concentrate in structurally simpler targets and vulnerability types with localized syntactic patterns. We report practical challenges including LLMs' non-determinism and the difficulty of preserving contract semantics. We then use the validated contracts to assess three static analyzers, revealing complementary and incomplete coverage profiles. Results show that LLM-based vulnerability injection is feasible, while exposing key limitations in scalability and diversity.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 27 references that are in the map. First posted on arXiv 2 Sep 2026.
Builds on
12 of 27 references.
References · 12
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 619
- 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 47
- 2019Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contractscited by 36
- 2025Mutation-Guided LLM-based Test Generation at Metacited by 25
- 2020How Effective are Smart Contract Analysis Tools? Evaluating Smart Contract Static Analysis Tools Using Bug Injectioncited by 20
- 2023SmartBugs 2.0: An Execution Framework for Weakness Detection in Ethereum Smart Contractscited by 4
- 2025FORGE: An LLM-driven Framework for Large-Scale Smart Contract Vulnerability Dataset Constructioncited by 4
- 2023OpenSCV: An Open Hierarchical Taxonomy for Smart Contract Vulnerabilitiescited by 3
- 2023Consolidation of Ground Truth Sets for Weakness Detection in Smart Contractscited by 3
- 2025Automated Vulnerability Injection in Solidity Smart Contracts: A Mutation-Based Approach for Benchmark Developmentcited by 2
- 2023Analyzing the Impact of Elusive Faults on Blockchain Reliabilitycited by 1
Built on by
Not cited yet.