Replaying Attack in Blockchain: What It Is, Real Examples, and How to Prevent It.

Table of Contents

Replaying attack

Share

In 1993, cryptographers called it ”the simplest attack in the book” take a valid message, wait, and send it again. Nobody builds a vault expecting the key to be reused.

But that’s exactly what happened when Ethereum and Ethereum Classic split: the same signed transaction, broadcast on two chains, moved real funds twice. No hack, no stolen password, no phishing link.

A replaying attack doing what it’s always done, using legitimacy as the weapon.

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

Read Also: Major Security Concerns in Crypto

What Is a Replay Attack (Replaying Attack)?

Replay attack sequence

A replay attack is a type of network security breach where an attacker intercepts valid data transmissions and maliciously reuses or resends them to deceive a system. 

Unlike attacks that alter or forge data, a replay attack simply re-transmits previously captured information, such as login credentials, authentication tokens, or transaction requests, to trick a system into believing it’s receiving a fresh, legitimate command.

Kindly note: A replay attack (replaying attack) can happen on the same chain or cross-chain.

Read Also: What does 5x mean in crypto?

What Is the Difference Between a Same-Chain and Cross-Chain Replay Attack?

A same-chain replay attack occurs within one blockchain: the same signed transaction or message is submitted multiple times to the same network.

The nonce mechanism prevents this for standard Ethereum transactions; once a nonce(number used once) is consumed, the same transaction is rejected.

Cross-chain replay attacks occur between two blockchains that share address formats and signature logic — most commonly after a hard fork.

The nonce(number used once) doesn’t help here, because the two chains track nonces independently. A transaction with nonce 5 on Ethereum and nonce 5 on Ethereum Classic are different records on different systems, but the signed transaction data is identical.

EIP-155’s chain ID is the specific fix for cross-chain replay. For smart contract signature verification, EIP-712’s domain separator handles both same-chain and cross-chain variants.

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

When Replay Attacks Actually Happened: Three Documented Cases

Replay attacks in blockchain are not theoretical. They’ve caused documented financial losses across multiple events.

The Ethereum/Ethereum Classic Fork — 2016

When the Ethereum network forked into Ethereum (ETH) and Ethereum Classic (ETC) following the DAO hack, every transaction signed before the fork was valid on both chains.

The two chains shared identical address spaces, transaction formats, and signature verification logic.

A transaction signed by any wallet was simultaneously a valid transaction on both ETH and ETC.

Exchanges that held ETH and ETC user funds immediately became targets.

Attackers intercepted valid ETH withdrawal transactions and replayed them on the ETC chain — draining ETC balances that users had no intention of touching.

Over 40,000 ETC was drained from exchanges in the period following the fork before replay protection was widely implemented.

This event directly prompted the creation of EIP-155.

The Ethereum Merge — 2022

When Ethereum transitioned from Proof of Work to Proof of Stake (The Merge), a forked chain called Ethereum PoW (ETHW) was created.

Within days, an attacker exploited the Omni Bridge cross-chain contract, which had no ETHW-specific replay protection, and replayed transactions that transferred 200 ETHW from the bridge contract.

The attacker used ETH mainnet oracle price data on the ETHW chain, where it was stale and manipulable, as part of the exploit.

The Optimism OP Token Theft — 2022

In a cross-chain replay incident, $20 million in OP tokens was stolen from Optimism during a disputed multisig transaction sequence.

The attack exploited the gap between L1 (Ethereum) and L2 (Optimism) chain contexts, where a replay of a specific signed message on the wrong chain moved tokens without authorization.

These aren’t isolated incidents. They represent a documented pattern: every time a new fork or L2 deployment creates two environments that share address or signature formats without chain-specific binding, replay risk exists.

Think about the last time a new chain launched that shared your Ethereum address. Did you check whether your existing signed authorizations were valid on that new chain? Did you verify your wallet’s signing scheme included EIP-155? Most people didn’t. Most people were fine. But the ones who weren’t fine lost real funds, and none of them expected to.

Read Also: How to earn crypto passively?

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

EIP-155: The Solution That Followed the 2016 Fork

EIP-155, introduced by Ethereum co-founder Vitalik Buterin in 2016, was created specifically to prevent transactions from being replayed across forked chains.

The fix was straightforward in principle: embed the chain’s unique identifier (chainId) into every transaction signature.

Before EIP-155, a transaction signature covered six data fields: nonce, gas price, gas limit, recipient address, value, and data.

The signature was valid on any EVM-compatible chain using the same verification logic because none of those fields identified which specific chain the transaction was intended for.

After EIP-155, transactions include three additional fields in the signature hash: chainId and two empty placeholder values.

A transaction signed for Ethereum mainnet (chainId = 1) is not a valid signature on Optimism (chainId = 10), Polygon (chainId = 137), or any other EVM chain.

The node receiving the transaction checks the chainId against its own and rejects any mismatch.

This single change significantly reduced cross-chain replay attacks for standard transactions.

The important limitation: EIP-155 only protects raw Ethereum transactions.

It does not protect application-level signatures, the signed messages that smart contracts verify internally using the ecrecover function.

A contract that validates off-chain signatures without checking chainId is still vulnerable to replay attacks even if EIP-155 is fully implemented at the transaction level. That’s where EIP-712 comes in.

The Nonce — How It Prevents Same-Chain Replay

The nonce (number used once) is the mechanism that prevents replay attacks within the same blockchain. Every Ethereum account maintains a counter that starts at 0 and increments by 1 with each transaction sent.

When you submit a transaction with nonce = 5, the network only accepts it if your current account nonce is exactly 5.

Once processed, your account nonce becomes 6, and any attempt to replay the nonce-5 transaction fails because the network now expects nonce 6.

This is why you can’t send the same Ethereum transaction twice on the same chain: the nonce prevents it. The catch identified by Gate.io’s March 2026 analysis: a nonce alone prevents same-chain replay, but not cross-chain replay because different chains maintain separate nonce counts.

Your account nonce on Ethereum mainnet and your account nonce on Ethereum Classic are tracked independently.

A transaction with nonce = 5 on Ethereum could also be nonce = 5 on Ethereum Classic if you’ve made the same number of transactions on both chains. EIP-155 fills this gap by making the chainId part of the signature itself.

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

EIP-712 — The Layer EIP-155 Didn’t Cover

EIP-155 solved transaction-level replay attacks. It doesn’t help with smart contract signature verification.

When a smart contract uses ecrecover to validate an off-chain signature, it’s verifying a message, not a transaction. EIP-155’s chainId protection applies to the Ethereum transaction that carries the message, not to the message content itself.

If a developer builds a contract that validates signatures without including the chainId, contract address, and nonce in the signed data, those signatures can be replayed by anyone who intercepts them.

EIP-712 (Typed Structured Data Signing) addresses this. It defines a standard way to structure signed messages that includes a domain separator, a hash that incorporates the chainId, the verifying contract’s address, and the contract’s name and version.

A signature created under EIP-712 is tied to a specific contract at a specific address on a specific chain.

It cannot be replayed on a different chain or a different contract, even if the bytecode is identical.

For developers: before deploying any contract that verifies off-chain signatures, ensure your signing scheme includes all three: nonce (prevents same-message reuse), chainId (prevents cross-chain replay), and contract address (prevents cross-contract replay). OpenZeppelin’s ECDSA library version 4.7.3 and above implements all three correctly.

Read Also: How does USDT payment work?

How a Replay Attack Works

How a replay attack works
StepAction
1. InterceptionEavesdrops on unencrypted networks using packet sniffers (e.g., Wireshark).
2. CaptureRecords valid data packets (credentials, tokens, or transaction requests).
3. AnalysisPrepares the captured packets for reuse without needing to decrypt them.
4. ReplayResends the valid packet back to the target system.
5. ExecutionThe system processes the duplicate request as legitimate if it lacks freshness checks.

How to Prevent Replay Attacks

Infographic showing how to prevent a replay attack
Protection MethodHow It WorksBest Used For
TimestampsRejects requests with a time falling outside an acceptable window (e.g., 30s–1 min).Time-sensitive transactions and API calls
Unique Identifiers / TokensAttaches a single-use random ID to a request and flags it after use to block repeats.Financial transactions and session IDs
Encryption (TLS / SSL / HTTPS)Scrambles data in transit to block packet-sniffing tools from capturing plaintext.Web applications, secure FTP, and backend services
Nonces (Numbers Used Once)Uses a random or sequential value that becomes invalid instantly once consumed.API security and 2FA: time-based one-time passwords (TOTP)

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

Systems and Protocols Vulnerable to Replay Attacks

Target System / ProtocolWhy It Is VulnerableCommon Examples & Flaws
Wireless NetworksOpen-air transmission makes data easy to intercept and resend.Outdated Wi-Fi (WEP/weak WPA) lacking packet sequencing; Bluetooth devices missing nonce validation or session pairing.
Cryptographic ProtocolsRelies on static keys or lacks context-aware freshness checks.Kerberos or OAuth when session tokens or credentials lack strict timestamps and expiration rules.
Internet of Things (IoT)Prioritizes low-power operation and convenience over robust security.Smart locks and cameras using IoT protocols (MQTT, CoAP) without built-in replay protection due to limited computing power.
Payment SystemsVulnerable if transactions lack dynamic, single-use authentication codes.Older contactless cards and POS terminals lacking EMV cryptograms or per-transaction tokens.

Read Also: Top 10 Cryptocurrency Security Best Practices for Beginners

How to Detect Replay Attacks

1. Timestamp Validation and Log Monitoring

Replay attacks often reuse data without modifying its original timestamp.

By monitoring and validating timestamps, systems can detect when messages are unexpectedly delayed or outside of an acceptable time window.

  • Implement strict time-based validity checks for tokens, transactions, and API calls.
  • Flag messages that appear to be delayed or processed outside a normal session duration.
  • Cross-reference system logs to identify requests with identical timestamps that appear more than once.

2. Duplicate Message Detection

A core signature of replay attacks is the repetition of identical messages or packets.

Systems should monitor for such patterns, particularly in critical areas such as authentication, financial transactions, and session management.

  • Use hashing or fingerprinting to detect duplicate packets or requests.
  • Compare incoming data against recently processed entries to check for repeated content.
  • Log and investigate repeated session tokens, API calls, or encrypted payloads.

3. Sequence Number and Nonce Tracking

Secure systems often rely on sequence numbers or nonces (numbers used once) to track and validate data uniqueness.

Replayed messages usually reuse the same nonce or sequence number, which can be flagged.

  • Keep a short-term memory (cache or database) of recently used nonces or sequence numbers.
  • Drop or log requests containing reused values.
  • Alert on session tokens or request identifiers that have already been processed.

4. Behavioral Anomaly Detection

Replay attacks may not always be technical duplicates; sometimes, the behavioral context can reveal the threat.

For example, a user performing the exact same transaction twice within seconds could be suspicious.

  • Monitor user behavior and create baseline profiles for normal activity.
  • Flag abnormal patterns such as high-frequency repeated actions, identical requests from different IPs, or multiple logins using the same token.
  • Integrate anomaly detection systems that can learn and adapt to typical traffic patterns.

5. Network Traffic Analysis

Advanced detection tools can analyze network traffic in real-time to look for suspicious patterns, especially in wireless or IoT environments where replay attacks are common.

  • Use Intrusion Detection Systems (IDS) or Wireless Intrusion Prevention Systems (WIPS) to detect suspicious packet retransmissions.
  • Analyze packet headers for reused identifiers, nonces, or encryption parameters.
  • Watch for repetitive encrypted payloads that don’t vary between sessions.

6. Session Token and Authentication Log Analysis

Replay attacks often involve reused authentication tokens. Systems should audit and analyze token issuance and usage logs to identify tokens that appear to be reused or misused.

  • Track session token lifespans and their associated IP/device information.
  • Log attempts to reuse expired or already consumed authentication credentials.
  • Investigate login attempts that reuse headers, metadata, or session details.

Read Also: Cryptocurrency Hardware Security Modules (HSMs) Explained

Frequently Asked Questions

What Is the Difference Between a Replay Attack and a MITM Attack?

A replay attack involves capturing and resending valid data to trick a system, while a man-in-the-middle (MitM) attack actively intercepts and alters communication between two parties in real time.

What Are the Most Common Types of Packets Captured in a Replay Attack?

The most common types of packets captured in a replay attack include authentication requests, session tokens, transaction messages, and control commands used in wireless or network communications.

How Does TLS Prevent a Replay Attack?

TLS prevents replay attacks by using unique session keys, sequence numbers, and message authentication codes (MACs) to ensure each message is fresh and cannot be resent or altered without detection.

What Is a Kerberos Replay Attack?

A Kerberos replay attack occurs when an attacker captures and resends a valid Kerberos authentication message to trick the system into granting unauthorized access without re-authenticating.

Join UEEx

Experience the World’s Leading Digital Wealth Management Platform

Sign UP

Final Thoughts

Replay attacks may appear simple, but their impact can be severe, ranging from unauthorized access to financial loss and service disruption.

Recognizing vulnerable systems, understanding how these attacks work, and applying layered defenses like nonces, timestamps, and encryption are essential. 

As threats continue to target weak points in verification processes, early detection and prevention become critical. 

Strengthening systems against replay attacks isn’t just about protection; it is about ensuring trust, data integrity, and consistent service across digital environments where security can’t be compromised.

Disclaimer: This article is intended solely for informational purposes and should not be considered trading or investment advice. Nothing herein should be construed as financial, legal, or tax advice. Trading or investing in cryptocurrencies carries a considerable risk of financial loss. Always conduct due diligence before making any trading or investment decisions.