Skip to content

Cross-Chain Source / Sender Not Verified

SAFE-0246 Bridge / Cross-Chain Checked automatically by the scanner
1

What goes wrong

A message handler (LayerZero lzReceive / CCIP _ccipReceive / custom relayer) does not verify the source chain and the remote sender address against a trusted-remote allowlist. Anyone can deliver a forged message and trigger privileged mint/release logic.

2

The vulnerable pattern

proof of concept — how it is exploited
// lzReceive(srcChain, srcAddr, payload) mints from payload without
// checking srcAddr. Attacker calls it directly with a forged payload
// -> unlimited cross-chain mint.
3

How to fix it

the pattern that is safe
require(msg.sender == address(endpoint), "not endpoint");
require(srcChain == TRUSTED_CHAIN && keccak256(srcAddr) == keccak256(TRUSTED_REMOTE), "bad source");
Enforce trusted-remote checks on every inbound message.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0246 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs