Cross-Contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts
Yinxing Xue, Mingliang Ma, Yun Lin, Yulei Sui, Jiaming Ye, Tianyong Peng
Abstract
Reentrancy bugs, one of the most severe vulnerabilities in smart contracts, have caused huge financial loss in recent years. Researchers have proposed many approaches to detecting them. However, empirical studies have shown that these approaches suffer from undesirable false positives and false negatives, when the code under detection involves the interaction between multiple smart contracts. In this paper, we propose an accurate and efficient cross-contract reentrancy detection approach in practice. Rather than design ruleof-thumb heuristics, we conduct a large empirical study of 11714 real-world contracts from Etherscan against three well-known general-purpose security tools for reentrancy detection. We manually summarized the reentrancy scenarios where the state-of-the-art approaches cannot address. Based on the empirical evidence, we present Clairvoyance, a cross-function and cross-contract static analysis to detect reentrancy vulnerabilities in real world with significantly higher accuracy. To reduce false negatives, we enable, for the first time, a cross-contract call chain analysis by tracking possibly tainted paths. To reduce false positives, we systematically summarized five major path protective techniques (PPTs) to support fast yet precise path feasibility checking. We implemented our approach and compared Clairvoyance with five state-of-the-art tools on 17770 real-worlds contracts. The results show that Clairvoyance yields the best detection accuracy among all the five tools and also finds 101 unknown reentrancy vulnerabilities.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
26 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Reentrancy Vulnerability Detection and Localization: A Deep Learning Based Two-phase Approach cites ZEUS: Analyzing Safety of Smart Contracts
- Reentrancy Vulnerability Detection and Localization: A Deep Learning Based Two-phase Approach cites Making Smart Contracts Smarter
- Reentrancy Vulnerability Detection and Localization: A Deep Learning Based Two-phase Approach cites Securify: Practical Security Analysis of Smart Contracts
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites ZEUS: Analyzing Safety of Smart Contracts
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites Making Smart Contracts Smarter
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on Ethereum cites Securify: Practical Security Analysis of Smart Contracts
- Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? cites ZEUS: Analyzing Safety of Smart Contracts
- Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? cites VerX: Safety Verification of Smart Contracts
- Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? cites Making Smart Contracts Smarter
- Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? cites sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners? cites Securify: Practical Security Analysis of Smart Contracts
- ZEUS: Analyzing Safety of Smart Contracts cites Making Smart Contracts Smarter
- sFuzz: an efficient adaptive fuzzer for solidity smart contracts cites ZEUS: Analyzing Safety of Smart Contracts
- sFuzz: an efficient adaptive fuzzer for solidity smart contracts cites Making Smart Contracts Smarter
- GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysis cites ZEUS: Analyzing Safety of Smart Contracts
- GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysis cites VerX: Safety Verification of Smart Contracts
- GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysis cites Securify: Practical Security Analysis of Smart Contracts
- WASAI: uncovering vulnerabilities in Wasm smart contracts cites Making Smart Contracts Smarter
- WASAI: uncovering vulnerabilities in Wasm smart contracts cites sFuzz: an efficient adaptive fuzzer for solidity smart contracts
- Securify: Practical Security Analysis of Smart Contracts cites ZEUS: Analyzing Safety of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts cites Making Smart Contracts Smarter
Cited by top-tier papers26
- GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program AnalysisYuqiang Sun, Daoyuan Wu, Yue Xue, Han Liu et al.ICSE 2024 · 131 citations
- Reentrancy Vulnerability Detection and Localization: A Deep Learning Based Two-phase ApproachZhuo Zhang, Yan Lei, Meng Yan, Yue Yu et al.ASE 2022 · 56 citations
- Turn the Rudder: A Beacon of Reentrancy Detection for Smart Contracts on EthereumZibin Zheng, Neng Zhang, Jianzhong Su, Zhijie Zhong et al.ICSE 2023 · 52 citations
- Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners?Stefanos Chaliasos, Marcos Antonios Charalambous, Liyi Zhou, Rafaila Galanopoulou et al.ICSE 2024 · 49 citations
- WASAI: uncovering vulnerabilities in Wasm smart contractsWeimin Chen, Zihan Sun, Haoyu Wang, Xiapu Luo et al.ISSTA 2022 · 43 citations
Builds on6
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais et al.CCS 2018 · 1,108 citations
- ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 citations
- sFuzz: an efficient adaptive fuzzer for solidity smart contractsTai D. Nguyen, Long H. Pham, Jun Sun, Yun Lin et al.ICSE 2020 · 260 citations
- VerX: Safety Verification of Smart ContractsAnton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen et al.S&P 2020 · 251 citations
Related papers
- Uncover the Premeditated Attacks: Detecting Exploitable Reentrancy Vulnerabilities by Identifying Attacker ContractsShuo Yang, Jiachi Chen, Mingyuan Huang, Zibin Zheng et al.ICSE 2024 · 24 citations
- AdvSCanner: Generating Adversarial Smart Contracts to Exploit Reentrancy Vulnerabilities Using LLM and Static AnalysisYin Wu, Xiaofei Xie, Chenyang Peng, Dijun Liu et al.ASE 2024 · 9 citations
- SmartDagger: a bytecode-based static analysis approach for detecting cross-contract vulnerabilityZeqin Liao, Zibin Zheng, Xiao Chen, Yuhong NanISSTA 2022 · 64 citations
- Verifying Smart Contract Security against Re-entrancy Attacks through Relational Value AnalysisDivya Rathore, Kartik NagarFSE 2026
- Silence False Alarms: Identifying Anti-Reentrancy Patterns on Ethereum to Refine Smart Contract Reentrancy DetectionQiyang Song, Heqing Huang, Xiaoqi Jia, Yuanbo Xie et al.NDSS 2025
