一句话:USCSA 结合 AST 差异分析与大语言模型推理,检测代理式可升级合约在升级过程中引入的漏洞。
可升级智能合约需要持续升级与维护,而升级操作本身常引入新的漏洞;现有静态分析工具通常只扫描单一版本,无法刻画代码变更与新增风险之间的关联。为此,作者提出可升级智能合约安全分析器 USCSA:它利用抽象语法树(AST)差异分析评估升级过程带来的风险,并借助大语言模型(LLM)进行辅助推理,实现高置信度的漏洞归因。作者收集并分析了 3,546 个可升级合约漏洞案例,覆盖重入、访问控制缺陷、整数溢出等常见类别。实验结果显示,USCSA 在检测升级引入漏洞上达到 92.26% 的精确率、89.67% 的召回率与 90.95% 的 F1 值,为区块链应用的安全审计提供了一种高效的新方案。
In the case of upgrading smart contracts on blockchain systems, it is essential to consider the continuity of upgrades and subsequent maintenance. In practice, upgrade operations often introduce new vulnerabilities. Existing static analysis tools usually only scan a single version and are unable to capture the correlation between code changes and emerging risks. To address this, we propose an Upgradeable Smart Contract Security Analyzer, USCSA, which uses Abstract Syntax Tree (AST) difference analysis to assess risks associated with the upgrade process and utilizes large language models (LLMs) for assisted reasoning to achieve high-confidence vulnerability attribution. We collected and analyzed 3,546 cases of vulnerabilities in upgradeable contracts, covering common vulnerability categories such as reentrancy, access control flaws, and integer overflow. Experimental results show that USCSA achieves a precision of 92.26%, a recall of 89.67%, and an F1-score of 90.95% in detecting upgrade-induced vulnerabilities. As a result, USCSA provides a significant advantage to improve the security and integrity of upgradeable smart contracts, offering a novel and efficient solution for security auditing on blockchain applications.