← All casesConfidential · Anonymized
Case
#021
Web3 · Severity: High

EIP-712 Signature Domain Replay

The application used the same EIP-712 domain separator on mainnet and on an L2 deployment. A signature intended for one chain was silently accepted on the other. User authorizations could be replayed across chains without their knowledge.

Industry
Web3
Scope
Application · Cryptography · Multi-chain
Timeline
R·Q1 → V·Q1 → R·Q1
Closed
Q1
01

Impact

Cross-chain replay
Any user signature valid on both mainnet and the L2 deployment
User-visible surface
Zero — attack is silent to the signer
Affected primitives
Order signing, permit approvals, delegated authorizations
Impact vectors
  • Cross-chain signature reuse
02

Reproduction

Steps below reproduce the finding against a staging replica. Where the reproduction affected a shared component, coordination was arranged before execution.

  1. 01Collect a valid mainnet signature from a legitimate user action.
  2. 02Submit the same signed payload to the L2 deployment.
  3. 03Verify acceptance: transaction executes against the same signer identity.
03

Vulnerability

Reused domain separator (simplified)solidity
bytes32 constant DOMAIN_SEPARATOR = keccak256(
  abi.encode(
    keccak256("EIP712Domain(string name,string version,address verifyingContract)"),
    keccak256("Xyrix"),
    keccak256("1"),
    // NOTE: chainId omitted. Same separator on every chain.
    address(this)
  )
);
04

Mitigation

Client-side mitigation shipped and validated during the engagement. Reference patch below.

Chain-bound domain (post-fix)solidity
bytes32 immutable DOMAIN_SEPARATOR;
constructor() {
  DOMAIN_SEPARATOR = keccak256(
    abi.encode(
      keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
      keccak256("Xyrix"),
      keccak256("1"),
      block.chainid,
      address(this)
    )
  );
}
// outstanding signatures invalidated via nonce migration.
05

Retest & Verify

  • Cross-chain replay attempts rejected post-migration (signature does not verify).
  • Outstanding pre-migration signatures invalidated by nonce bump.
  • User-facing flows re-issued signatures transparently on next action.
06

Deliverables

  • Technical Report
  • Domain-separator migration plan
  • Outstanding-signature invalidation script
  • Retesting report
07

Sign-off

Handled by
Epulyx
Reviewed by
Nolan
Closed
Case closed after cross-chain replay path verified closed.
Cookies

We use a minimal set of cookies to keep this site functional. Analytics cookies only with your consent. Cookie Policy.