# One Signature, Multiple Payments: Demystifying and Detecting Signature Replay Vulnerabilities in Smart Contracts

Crypto.world

> Smart contracts use digital signatures to prove that a caller has permission to do something, such as transfer tokens. If a contract verifies a signature but never checks how many times or where that…

**arXiv**: 2511.09134

**Published**: 2025-11-12

**Authors**: Zexu Wang, Jiachi Chen, Zewei Lin, Wenqing Chen, Kaiwen Ning, Jianxing Yu, Yuming Feng, Yu Zhang, Weizhe Zhang, Zibin Zheng

## AI summary

## Overview

**Research area:** Blockchain and smart contract security, specifically vulnerability detection for signature-based authorization flaws, with an LLM-assisted static analysis component.

**Technical level:** Advanced. The paper assumes familiarity with Ethereum's `ecrecover()`, ECDSA, `v/r/s` signature parameters, EIP-712 / EIP-1271 / EIP-4337 standards, static taint analysis, program dependency graphs, and symbolic execution with an SMT solver.

**Scope:** A first empirical study that defines and classifies Signature Replay Vulnerabilities (SRVs) from 108 real audit reports, plus a three-phase LLM-assisted detection tool, LASiR, evaluated on 15,383 signature-verifying contracts drawn from 918,964 contracts across four blockchains.

## What This Paper Is About

Smart contracts use digital signatures to prove that a caller has permission to do something, such as transfer tokens. If a contract verifies a signature but never checks *how many times* or *where* that signature may be used, an attacker can copy a valid signature off the blockchain and submit it again and again, each time receiving a fresh payment or authorization. The authors call this a Signature Replay Vulnerability (SRV), and the paper's goal is twofold: first to systematically define and categorize these flaws from real audit reports, and second to build an automated detector, LASiR, that finds them in real deployed contracts.

## Key Contributions

1. **First empirical study of SRVs.** The authors manually examined 1,419 open-source audit reports from 37 security companies, isolated 108 reports containing detailed signature-replay descriptions, and used the Open Card Sorting method to derive five SRV categories with real code examples.
2. **The LASiR detector.** A three-phase tool that combines LLM semantic understanding with static taint analysis of signature state and symbolic-execution path reachability verification, so that LLM judgments are checked rather than trusted blindly.
3. **A large-scale measurement dataset.** 918,964 contract source codes crawled from Ethereum, Binance Smart Chain, Polygon, and Arbitrum, reduced to 15,383 signature-verifying contracts (DB1), of which 1,739 are reported to contain SRVs holding $4.76 million in active assets.
4. **Public artifacts.** Tool code, experimental data, and empirical research data released at an anonymous repository (https://anonymous.4open.science/r/LASiR-B207).

## Main Findings

- **SRVs are common in practice.** Of contracts that use signatures on Ethereum, **19.63%** contain SRVs. Affected contracts across the dataset hold **$4.76 million** in active assets, spread over **1,739** contracts.
- **Detection accuracy (manual validation).** On a random sample of **500** contracts from DB1, manually labeled into **72** positive and **428** negative cases (DB2), LASiR reached **82.14% precision**, **95.83% recall**, and an **F1-score of 88.46%**. The abstract states an F1-score of **87.90%**; the experimental sections report **88.46%**, so the paper is internally inconsistent on this one number.
- **LLM semantics drive the accuracy.** In the ablation study, removing the LLM component dropped precision from **82.14% to 4.40%**, recall from **95.83% to 26.39%**, and F1 from **88.46% to 7.54%**. The authors conclude that LLM-provided contract context is essential for the taint analysis to work.
- **Cost and speed are modest.** Average detection time is about **40 seconds** per contract, and the total LLM API cost for the large-scale experiment was roughly **$15**.
- **Filtering funnel.** Keyword filtering ("signature", "ecrecover()", "replay attack") cut the 1,419 reports to **557** candidates — **467** matching "signature", **28** matching "ecrecover()", and **62** matching "replay attack" — which manual review reduced to the final **108** SRV reports.
- **Five SRV types identified.** Cross-chain Replay Attack (X-CRA), Cross-project Replay Attack (X-PRA), Contract Account Signature Replay (CASR), Signature State Management Issue (SSMI), and Signature Malleability Attack (SMA). Each is tied to a missing check: `block.chainid`, `address(this)`, the contract-account identity address, a nonce/usage tracker per EIP-712, and the `v`/`s` range constraints respectively.
- **Classification was highly consistent.** Two researchers labeling all 108 cards disagreed on only **4** cards, a disagreement rate of **3.7%**. They initially produced five categories including *Front-Running Replay Attacks*, added *Contract Account Signature Replay* in the second round over the remaining 60% of cards, and then removed Front-Running Replay as too narrow.
- **Real losses cited.** The AzukiDAO incident (July 2023) lost **$69K** through reused signatures; a developer error in the `branchMask` function of the Polygon Plasma Bridge let one signature be validated **223 times** for burn transactions, enabling a **$22.3 million** theft.
- **Developer context.** The paper cites Zhang et al.'s finding that **56.3%** of contract developers struggle to implement cryptographic practices and **68.1%** believe existing security tools need improvement.

## Methodology in Plain English

The work has an empirical half and a tool half.

**Empirical half.** The authors collected 1,419 public audit reports from security firms listed by Etherscan and from Solodit bug-bounty disclosures. They keyword-searched for signature-related terms, manually discarded false matches (for example, reports about an "incorrect function signature"), and ended with 108 genuine SRV reports. Each report became a "card" recording title, descriptions, root cause, and recommendation. Two experienced researchers sorted the cards in three rounds — a 40% sample first, then the remaining 60% independently, then a reconciliation — producing the final five categories.

**Tool half.** LASiR takes Solidity source code and runs three phases:

1. **Slicing.** The contract is compiled to an AST and turned into an Inter-contract Program Dependency Graph (I-PDG) that captures data dependencies, control dependencies, and cross-contract calls. Every function containing `ecrecover()` becomes an "Initial Code Block." An LLM (via Prompt_A, designed with a three-tier chain-of-thought structure and JSON output) is asked to act as a security auditor and name the variables that actually matter to signature verification. Those variables drive function-level slicing, which keeps whole functions intact so the LLM sees coherent context and stays within its input limit.
2. **Inspection.** A second prompt (Prompt_B) asks the LLM which variables get *sanitized* — that is, properly validated — for each of the five SRV types, using per-type identification rules and sanitization methods. LASiR then does a depth-first search on the I-PDG from those variables' definition nodes to collect the code that depends on them, and applies domain-specific patterns for each SRV type to produce warnings naming the risky functions.
3. **Path reachability.** A third prompt (Prompt_C) asks the LLM to review each warning and, if confirmed, emit the sequence of functions that would execute the exploit. That sequence guides symbolic execution along the CFG instead of blind exploration. Path constraints — including signature digest construction, `ecrecover()`, `require` checks, and state updates — are encoded with a symbolic memory model for EVM instructions and handed to an SMT solver (Z3). A SAT result proves an input exists that passes both signature verification and access control, so the vulnerability is reported.

The point of the hybrid design is that the LLM supplies semantic understanding that pattern matching lacks, while symbolic execution supplies a proof obligation that keeps LLM mistakes from becoming false positives.

## Why This Matters

**Impact on research.** The paper establishes SRV as a named, categorized vulnerability class with a shared vocabulary (X-CRA, X-PRA, CASR, SSMI, SMA) that prior work did not provide, and it demonstrates a general recipe for using LLMs as semantic oracles inside classical static analysis rather than as standalone detectors. The ablation numbers — a drop to 4.40% precision without the LLM — are the strongest argument in the paper for that hybrid architecture, and they are reusable for other smart contract vulnerability classes.

**Real-world applications.**

- **Pre-deployment auditing.** Developers can run LASiR on contracts using `ecrecover()` or EIP-1271 to catch missing `chainid`, contract-address, nonce, or `v`/`s` checks before deployment.
- **Post-deployment monitoring.** The 1,739 flagged contracts holding $4.76 million in assets form a concrete watchlist for protocols, their users, or whitehats to migrate funds or patch logic.
- **Bug bounty and audit triage.** The 108-report classification with root causes and recommendations maps directly onto the checklist-style review auditors already perform.
- **Toolchain and library guidance.** The findings point at specific fixes — EIP-4337's `block.chainid`, EIP-712's `domainSeparator` and nonces, `address(this)` in the digest, and OpenZeppelin's ECDSA library version 4.7.3 or later — that wallet and framework maintainers can enforce by default.

**Industry relevance.** Signature-based authorization underpins permits, meta-transactions, bridges, and account abstraction, all of which are high-value targets. A detector that costs about $15 and 40 seconds per contract to run at dataset scale is economically viable for exchanges screening listed tokens, for audit firms screening portfolios, and for security teams running continuous regression checks.

## Future Directions

- **Vulnerability repair and automated exploitation.** The authors explicitly position their dataset as groundwork for repair research and for automated exploitation of the 1,739 flagged contracts, but neither is implemented here.
- **Precision on the 82.14% figure.** Roughly one in six reported findings is a false positive. The truncated content does not break down which SRV types or code patterns produce the false positives, which would be the natural next step for tightening the taint patterns and prompts.
- **Generalization beyond the four chains and beyond Solidity source availability.** LASiR requires source code and was evaluated on Ethereum, Binance Smart Chain, Polygon, and Arbitrum; whether it transfers to other VMs or to unverified bytecode-only contracts is not reported.
- **LLM dependence and cost scaling.** The reported ~$15 total cost is for this experiment, and the ablation shows the approach collapses without the LLM. Robustness to model changes, prompt sensitivity, and the reliability of the JSON-constrained multi-tier prompting are open engineering questions.

## Target Audience

Smart contract auditors and security engineers who review signature verification logic; blockchain security researchers working on static analysis, taint analysis, or LLM-assisted program analysis; tooling engineers at audit firms, exchanges, and wallet providers who need automated pre-listing or pre-deployment screening; and graduate students or researchers looking for a worked example of combining LLM semantic reasoning with symbolic execution to defeat path explosion.

## Authors’ abstract

Smart contracts have significantly advanced blockchain technology, and digital signatures are crucial for reliable verification of contract authority. Through signature verification, smart contracts can ensure that signers possess the required permissions, thus enhancing security and scalability. However, lacking checks on signature usage conditions can lead to repeated verifications, increasing the risk of permission abuse and threatening contract assets. We define this…

[The full abstract on arXiv](https://arxiv.org/abs/2511.09134)

[Read the original paper](https://arxiv.org/abs/2511.09134)

---

Canonical: https://crypto.world/paper/one-signature-multiple-payments-demystifying-and-detecting-signature-2511.09134
