mlsanityData to 7 Oct 2026

GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysis

arXiv 2308.03314 ↗First posted 7 Aug 2023cs.CR cs.AI cs.SEcited by 65

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  4. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  5. 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
  6. 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 102
  7. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
  8. 2019Slither: A Static Analysis Framework For Smart Contractscited by 88
  9. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  10. 2018Securify: Practical Security Analysis of Smart Contractscited by 61
  11. 2022Transformer-Based Language Models for Software Vulnerability Detectioncited by 39
  12. 2019Manticore: A User-Friendly Symbolic Execution Framework for Binaries and Smart Contractscited by 36
10 more
  1. 2023Do you still need a manual smart contract audit?cited by 34
  2. 2023Evaluation of ChatGPT Model for Vulnerability Detectioncited by 33
  3. 2018ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detectioncited by 32
  4. 2018Vandal: A Scalable Security Analysis Framework for Smart Contractscited by 18
  5. 2018Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attackscited by 17
  6. 2019Harvey: A Greybox Fuzzer for Smart Contractscited by 10
  7. 2021SAILFISH: Vetting Smart Contract State-Inconsistency Bugs in Secondscited by 10
  8. 2022BlockScope: Detecting and Investigating Propagated Vulnerabilities in Forked Blockchain Projectscited by 4
  9. 2019MPro: Combining Static and Symbolic Analysis for Scalable Testing of Smart Contractcited by 2
  10. 2023Detecting software vulnerabilities using Language Modelscited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 18; 2025: 28; 2026: 18.

65 papers.

Sort:

By area:

  1. 2024When LLMs Meet Cybersecurity: A Systematic Literature Reviewcited by 70
  2. 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
  3. 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoningcited by 57
  4. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 57
  5. 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
  6. 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditingcited by 47
  7. 2024Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justificationscited by 41
  8. 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generationcited by 36
  9. 2024Testing and Understanding Erroneous Planning in LLM Agents through Synthesized User Inputscited by 22
  10. 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
  11. 2025Measuring and Augmenting Large Language Models for Solving Capture-the-Flag Challengescited by 14
  12. 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
38 more
  1. 2024LLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Papercited by 9
  2. 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
  3. 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanationcited by 8
  4. 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMcited by 8
  5. 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
  6. 2025Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detectioncited by 7
  7. 2025Combining Large Language Models with Static Analyzers for Code Review Generationcited by 6
  8. 2025Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilitiescited by 5
  9. 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmapcited by 5
  10. 2024Can Language Models Pretend Solvers? Logic Code Simulation with LLMscited by 4
  11. 2025Detecting Various DeFi Price Manipulations with LLM Reasoningcited by 4
  12. 2025Prompt to Pwn: Automated Exploit Generation for Smart Contractscited by 4
  13. 2025Agentic Discovery and Validation of Android App Vulnerabilitiescited by 4
  14. 2025Agentic Specification Generator for Move Programscited by 3
  15. 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
  16. 2024Detection Made Easy: Potentials of Large Language Models for Solidity Vulnerabilitiescited by 2
  17. 2025SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Modelscited by 2
  18. 2025Towards Secure Program Partitioning for Smart Contracts with LLM's In-Context Learningcited by 2
  19. 2025Adaptive Plan-Execute Framework for Smart Contract Security Auditingcited by 2
  20. 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detectioncited by 2
  21. 2025Data and Context Matter: Towards Generalizing AI-based Software Vulnerability Detectioncited by 2
  22. 2025CoTDeceptor:Adversarial Code Obfuscation Against CoT-Enhanced LLM Code Agentscited by 2
  23. 2024ANVIL: Anomaly-based Vulnerability Identification without Labelled Training Datacited by 1
  24. 2024FTSmartAudit: A Knowledge Distillation-Enhanced Framework for Automated Smart Contract Auditing Using Fine-Tuned LLMscited by 1
  25. 2025Leveraging Large Language Models for Command Injection Vulnerability Analysis in Python: An Empirical Study on Popular Open-Source Projectscited by 1
  26. 2025Web3 x AI Agents: Landscape, Integrations, and Foundational Challengescited by 1
  27. 2025Towards Secure and Explainable Smart Contract Generation with Security-Aware Group Relative Policy Optimizationcited by 1
  28. 2025ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detectioncited by 1
  29. 2026SolAgent: A Specialized Multi-Agent Framework for Solidity Code Generationcited by 1
  30. 2026A Dual-Loop Agent Framework for Automated Vulnerability Reproductioncited by 1
  31. 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarizationcited by 1
  32. 2026Agora: Toward Autonomous Bug Detection in Production-Level Consensus Protocols with LLM Agentscited by 1
  33. 2026RECEIPT: Deterministic, Reward-Hacking-Resistant Verification for White-Box Agentic XSS Discoverycited by 1
  34. 2024Beyond Fidelity: Explaining Vulnerability Localization of Learning-based Detectorscited by 0
  35. 2024JANUS: A Difference-Oriented Analyzer For Financial Centralization Risks in Smart Contractscited by 0
  36. 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAGcited by 0
  37. 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniquescited by 0
  38. 2025Fine-Tuning Code Language Models to Detect Cross-Language Bugscited by 0

50 most cited of 65 All 65 (JSON)