GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysis
Not on the map. Why?
Abstract (arXiv)
Smart contracts are prone to various vulnerabilities, leading to substantial financial losses over time. Current analysis tools mainly target vulnerabilities with fixed control or data-flow patterns, such as re-entrancy and integer overflow. However, a recent study on Web3 security bugs revealed that about 80% of these bugs cannot be audited by existing tools due to the lack of domain-specific property description and checking. Given recent advances in Large Language Models (LLMs), it is worth exploring how Generative Pre-training Transformer (GPT) could aid in detecting logicc vulnerabilities. In this paper, we propose GPTScan, the first tool combining GPT with static analysis for smart contract logic vulnerability detection. Instead of relying solely on GPT to identify vulnerabilities, which can lead to high false positives and is limited by GPT's pre-trained knowledge, we utilize GPT as a versatile code understanding tool. By breaking down each logic vulnerability type into scenarios and properties, GPTScan matches candidate vulnerabilities with GPT. To enhance accuracy, GPTScan further instructs GPT to intelligently recognize key variables and statements, which are then validated by static confirmation. Evaluation on diverse datasets with around 400 contract projects and 3K Solidity files shows that GPTScan achieves high precision (over 90%) for token contracts and acceptable precision (57.14%) for large projects like Web3Bugs. It effectively detects ground-truth logic vulnerabilities with a recall of over 70%, including 9 new vulnerabilities missed by human auditors. GPTScan is fast and cost-effective, taking an average of 14.39 seconds and 0.01 USD to scan per thousand lines of Solidity code. Moreover, static confirmation helps GPTScan reduce two-thirds of false positives.
Key facts. Cited by 65 papers in the map (data through 7 Oct 2026). Builds on 22 of its 49 references that are in the map. First posted on arXiv 7 Aug 2023.
Builds on
22 of 49 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 102
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
- 2019Slither: A Static Analysis Framework For Smart Contractscited by 88
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2018Securify: Practical Security Analysis of Smart Contractscited by 61
- 2022Transformer-Based Language Models for Software Vulnerability Detectioncited by 39
- 2019Manticore: A User-Friendly Symbolic Execution Framework for Binaries and Smart Contractscited by 36
10 more
- 2023Do you still need a manual smart contract audit?cited by 34
- 2023Evaluation of ChatGPT Model for Vulnerability Detectioncited by 33
- 2018ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detectioncited by 32
- 2018Vandal: A Scalable Security Analysis Framework for Smart Contractscited by 18
- 2018Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attackscited by 17
- 2019Harvey: A Greybox Fuzzer for Smart Contractscited by 10
- 2021SAILFISH: Vetting Smart Contract State-Inconsistency Bugs in Secondscited by 10
- 2022BlockScope: Detecting and Investigating Propagated Vulnerabilities in Forked Blockchain Projectscited by 4
- 2019MPro: Combining Static and Symbolic Analysis for Scalable Testing of Smart Contractcited by 2
- 2023Detecting software vulnerabilities using Language Modelscited by 2
Built on by
Citing papers per year: 2023: 1; 2024: 18; 2025: 28; 2026: 18.
65 papers.
Sort:
By area:
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoningcited by 57
- 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 57
- 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
- 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditingcited by 47
- 2024Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justificationscited by 41
- 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generationcited by 36
- 2024Testing and Understanding Erroneous Planning in LLM Agents through Synthesized User Inputscited by 22
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2025Measuring and Augmenting Large Language Models for Solving Capture-the-Flag Challengescited by 14
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
38 more
- 2024LLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Papercited by 9
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanationcited by 8
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMcited by 8
- 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
- 2025Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detectioncited by 7
- 2025Combining Large Language Models with Static Analyzers for Code Review Generationcited by 6
- 2025Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilitiescited by 5
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmapcited by 5
- 2024Can Language Models Pretend Solvers? Logic Code Simulation with LLMscited by 4
- 2025Detecting Various DeFi Price Manipulations with LLM Reasoningcited by 4
- 2025Prompt to Pwn: Automated Exploit Generation for Smart Contractscited by 4
- 2025Agentic Discovery and Validation of Android App Vulnerabilitiescited by 4
- 2025Agentic Specification Generator for Move Programscited by 3
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2024Detection Made Easy: Potentials of Large Language Models for Solidity Vulnerabilitiescited by 2
- 2025SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Modelscited by 2
- 2025Towards Secure Program Partitioning for Smart Contracts with LLM's In-Context Learningcited by 2
- 2025Adaptive Plan-Execute Framework for Smart Contract Security Auditingcited by 2
- 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detectioncited by 2
- 2025Data and Context Matter: Towards Generalizing AI-based Software Vulnerability Detectioncited by 2
- 2025CoTDeceptor:Adversarial Code Obfuscation Against CoT-Enhanced LLM Code Agentscited by 2
- 2024ANVIL: Anomaly-based Vulnerability Identification without Labelled Training Datacited by 1
- 2024FTSmartAudit: A Knowledge Distillation-Enhanced Framework for Automated Smart Contract Auditing Using Fine-Tuned LLMscited by 1
- 2025Leveraging Large Language Models for Command Injection Vulnerability Analysis in Python: An Empirical Study on Popular Open-Source Projectscited by 1
- 2025Web3 x AI Agents: Landscape, Integrations, and Foundational Challengescited by 1
- 2025Towards Secure and Explainable Smart Contract Generation with Security-Aware Group Relative Policy Optimizationcited by 1
- 2025ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detectioncited by 1
- 2026SolAgent: A Specialized Multi-Agent Framework for Solidity Code Generationcited by 1
- 2026A Dual-Loop Agent Framework for Automated Vulnerability Reproductioncited by 1
- 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarizationcited by 1
- 2026Agora: Toward Autonomous Bug Detection in Production-Level Consensus Protocols with LLM Agentscited by 1
- 2026RECEIPT: Deterministic, Reward-Hacking-Resistant Verification for White-Box Agentic XSS Discoverycited by 1
- 2024Beyond Fidelity: Explaining Vulnerability Localization of Learning-based Detectorscited by 0
- 2024JANUS: A Difference-Oriented Analyzer For Financial Centralization Risks in Smart Contractscited by 0
- 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAGcited by 0
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniquescited by 0
- 2025Fine-Tuning Code Language Models to Detect Cross-Language Bugscited by 0
50 most cited of 65 All 65 (JSON)
- 2026Demystifying Agent Skills for Smart Contract Auditing: Design, Effectiveness, Behavioral Impact24 Sep 2026
- 2026Automated Vulnerability Injection in Smart Contracts Using Large Language Models2 Sep 2026
- 2026Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language Models20 Aug 2026
- 2026RAGas: Retrieval-Augmented Gas Optimization for Smart Contracts with Continuous Knowledge Integration16 Aug 2026
- 2026RECEIPT: Deterministic, Reward-Hacking-Resistant Verification for White-Box Agentic XSS Discovery20 Jul 2026
- 2026Beyond Detection: Agentic Attack Synthesis and Simulation for Smart Contracts17 Jul 2026
- 2026Words Speak Louder Than Code: Investigating Cognitive Heuristics in LLM-Based Code Vulnerability Detection29 Jun 2026
- 2026CyberChainBench: Can AI Agents Secure Smart Contracts Against Real-World On-Chain Vulnerabilities?24 Jun 2026
- 2026Decoupled Smart Contract Audits: Lightweight LLM Framework via Distillation and Aggregation2 Jun 2026
- 2026Agora: Toward Autonomous Bug Detection in Production-Level Consensus Protocols with LLM Agents28 May 2026
- 2026Security of LLM-generated Code: A Comparative Analysis21 May 2026
- 2026CHAINTRIX: A multi-pipeline LLM-augmented framework for automated smart-contract security auditing10 May 2026
38 more
- 2026Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts5 May 2026
- 2026A systematic literature Review for Transformer-based Software Vulnerability detection27 Apr 2026
- 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarization27 Mar 2026
- 2026A Dual-Loop Agent Framework for Automated Vulnerability Reproduction5 Feb 2026
- 2026SPEAR: An Engineering Case Study of Multi-Agent Coordination for Smart Contract Auditing4 Feb 2026
- 2026SolAgent: A Specialized Multi-Agent Framework for Solidity Code Generation30 Jan 2026
- 2025CoTDeceptor:Adversarial Code Obfuscation Against CoT-Enhanced LLM Code Agents24 Dec 2025
- 2025From Lab to Reality: A Practical Evaluation of Deep Learning Models and LLMs for Vulnerability Detection11 Dec 2025
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmap4 Dec 2025
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLM1 Dec 2025
- 2025ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection20 Oct 2025
- 2025Agentic Specification Generator for Move Programs29 Sep 2025
- 2025Towards Secure and Explainable Smart Contract Generation with Security-Aware Group Relative Policy Optimization12 Sep 2025
- 2025SEASONED: Semantic-Enhanced Self-Counterfactual Explainable Detection of Adversarial Exploiter Contracts6 Sep 2025
- 2025Agentic Discovery and Validation of Android App Vulnerabilities29 Aug 2025
- 2025Data and Context Matter: Towards Generalizing AI-based Software Vulnerability Detection14 Aug 2025
- 2025Web3 x AI Agents: Landscape, Integrations, and Foundational Challenges4 Aug 2025
- 2025Prompt to Pwn: Automated Exploit Generation for Smart Contracts2 Aug 2025
- 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detection30 Jul 2025
- 2025Fine-Tuning Code Language Models to Detect Cross-Language Bugs29 Jul 2025
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAG5 Jul 2025
- 2025Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detection23 Jun 2025
- 2025Measuring and Augmenting Large Language Models for Solving Capture-the-Flag Challenges21 Jun 2025
- 2025Adaptive Plan-Execute Framework for Smart Contract Security Auditing21 May 2025
- 2025Leveraging Large Language Models for Command Injection Vulnerability Analysis in Python: An Empirical Study on Popular Open-Source Projects21 May 2025
- 2025Frontier AI's Impact on the Cybersecurity Landscape7 Apr 2025
- 2025Towards Secure Program Partitioning for Smart Contracts with LLM's In-Context Learning20 Feb 2025
- 2025Detecting Various DeFi Price Manipulations with LLM Reasoning17 Feb 2025
- 2025SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models11 Feb 2025
- 2025Combining Large Language Models with Static Analyzers for Code Review Generation10 Feb 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
- 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing30 Jan 2025
- 2025Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilities13 Jan 2025
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Security19 Dec 2024
- 2024JANUS: A Difference-Oriented Analyzer For Financial Centralization Risks in Smart Contracts5 Dec 2024
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanation9 Nov 2024
- 2024FTSmartAudit: A Knowledge Distillation-Enhanced Framework for Automated Smart Contract Auditing Using Fine-Tuned LLMs17 Oct 2024
50 newest of 65 All 65 (JSON)
- 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditingcited by 47
- 2024Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justificationscited by 41
- 2024Testing and Understanding Erroneous Planning in LLM Agents through Synthesized User Inputscited by 22
- 2025Agentic Discovery and Validation of Android App Vulnerabilitiescited by 4
- 2025Agentic Specification Generator for Move Programscited by 3
- 2025CoTDeceptor:Adversarial Code Obfuscation Against CoT-Enhanced LLM Code Agentscited by 2
- 2026SolAgent: A Specialized Multi-Agent Framework for Solidity Code Generationcited by 1
- 2026A Dual-Loop Agent Framework for Automated Vulnerability Reproductioncited by 1
- 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarizationcited by 1
- 2026Agora: Toward Autonomous Bug Detection in Production-Level Consensus Protocols with LLM Agentscited by 1
- 2026RECEIPT: Deterministic, Reward-Hacking-Resistant Verification for White-Box Agentic XSS Discoverycited by 1
- 2026CyberChainBench: Can AI Agents Secure Smart Contracts Against Real-World On-Chain Vulnerabilities?cited by 0
12 most cited of 14 All 14 (JSON)
- 2026Demystifying Agent Skills for Smart Contract Auditing: Design, Effectiveness, Behavioral Impact24 Sep 2026
- 2026RECEIPT: Deterministic, Reward-Hacking-Resistant Verification for White-Box Agentic XSS Discovery20 Jul 2026
- 2026Beyond Detection: Agentic Attack Synthesis and Simulation for Smart Contracts17 Jul 2026
- 2026CyberChainBench: Can AI Agents Secure Smart Contracts Against Real-World On-Chain Vulnerabilities?24 Jun 2026
- 2026Agora: Toward Autonomous Bug Detection in Production-Level Consensus Protocols with LLM Agents28 May 2026
- 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarization27 Mar 2026
- 2026A Dual-Loop Agent Framework for Automated Vulnerability Reproduction5 Feb 2026
- 2026SolAgent: A Specialized Multi-Agent Framework for Solidity Code Generation30 Jan 2026
- 2025CoTDeceptor:Adversarial Code Obfuscation Against CoT-Enhanced LLM Code Agents24 Dec 2025
- 2025Agentic Specification Generator for Move Programs29 Sep 2025
- 2025Agentic Discovery and Validation of Android App Vulnerabilities29 Aug 2025
- 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing30 Jan 2025
12 newest of 14 All 14 (JSON)
- 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generationcited by 36
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMcited by 8
- 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
- 2025ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detectioncited by 1
- 2026RAGas: Retrieval-Augmented Gas Optimization for Smart Contracts with Continuous Knowledge Integrationcited by 0
- 2026RAGas: Retrieval-Augmented Gas Optimization for Smart Contracts with Continuous Knowledge Integration16 Aug 2026
- 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLM1 Dec 2025
- 2025ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection20 Oct 2025
- 2024Retrieval-Augmented Test Generation: How Far Are We?19 Sep 2024
- 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generation4 May 2024
- 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2025Measuring and Augmenting Large Language Models for Solving Capture-the-Flag Challengescited by 14
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanationcited by 8
- 2025Combining Large Language Models with Static Analyzers for Code Review Generationcited by 6
- 2025Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilitiescited by 5
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmapcited by 5
- 2024Can Language Models Pretend Solvers? Logic Code Simulation with LLMscited by 4
12 most cited of 40 All 40 (JSON)
- 2026Automated Vulnerability Injection in Smart Contracts Using Large Language Models2 Sep 2026
- 2026Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language Models20 Aug 2026
- 2026Words Speak Louder Than Code: Investigating Cognitive Heuristics in LLM-Based Code Vulnerability Detection29 Jun 2026
- 2026Decoupled Smart Contract Audits: Lightweight LLM Framework via Distillation and Aggregation2 Jun 2026
- 2026Security of LLM-generated Code: A Comparative Analysis21 May 2026
- 2026CHAINTRIX: A multi-pipeline LLM-augmented framework for automated smart-contract security auditing10 May 2026
- 2026Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts5 May 2026
- 2026A systematic literature Review for Transformer-based Software Vulnerability detection27 Apr 2026
- 2026SPEAR: An Engineering Case Study of Multi-Agent Coordination for Smart Contract Auditing4 Feb 2026
- 2025From Lab to Reality: A Practical Evaluation of Deep Learning Models and LLMs for Vulnerability Detection11 Dec 2025
- 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmap4 Dec 2025
- 2025SEASONED: Semantic-Enhanced Self-Counterfactual Explainable Detection of Adversarial Exploiter Contracts6 Sep 2025
12 newest of 40 All 40 (JSON)