All vulnerabilities
HIGHWeb3

WEB3-FRONTEND-DNS-HIJACK-2022

Web3 · dApp web frontend / DNS / registrar / CDN trust boundary

Summary

A frontend hijack leaves the on-chain contracts untouched but replaces the Web2 surface serving the dApp UI with a wallet-drainer clone, so no Solidity audit can catch it. The recurring pattern: attackers take over the domain registrar or DNS provider account (or a CDN/tag-manager account), repoint the domain to a cloned site, and prompt visitors to sign malicious token approvals, EIP-2612 permit signatures, or transfers. Curve Finance was hit twice: on August 9-10, 2022 its curve.fi domain was DNS-hijacked via a compromised nameserver and drained ~$570K in USDC/DAI; and again around May 12, 2025 at the registrar level, after which Curve permanently migrated to curve.finance and announced an ENS move (Convex Finance and Resupply, which depend on Curve's data feeds, suffered dependency-driven outages but were not themselves compromised). In July 2024 a mass wave hit DeFi domains registered through Squarespace, whose forced migration off Google Domains stripped 2FA: Compound's frontend redirected to an Inferno Drainer clone and 100+ protocols were exposed (Celer blocked its takeover via domain monitoring). Ambient Finance's domain was hijacked through stolen registrar credentials on October 17, 2024. Most recently, on April 14, 2026 attackers used forged identity documents to social-engineer the registrar into handing over DNS control of CoW Swap's swap.cow.fi and cow.fi domains, redirecting users to a pixel-perfect drainer clone for about 90 minutes; over $1M was taken in roughly three hours, including 219 ETH (~$750K) from a single wallet, while CoW's contracts, backend APIs, and solver network were untouched. The same bucket includes CDN-account injections (KyberSwap's September 2022 Cloudflare/Google Tag Manager compromise, ~$265K) and BGP route hijacks that swap signed bundles for drainer code.

How to avoid it in your code

  • Pin asset integrity with Subresource Integrity (SRI) hashes on all scripts and bundles so a swapped or injected script fails to load.
  • Enable registrar lock and registry lock (serverTransferProhibited), DNSSEC, and hardware-key (FIDO2/WebAuthn) 2FA on registrar, DNS, CDN, and email accounts; registry lock forces out-of-band verification so a forged-document or account-takeover request cannot silently move records.
  • Serve the dApp from content-addressed hosting (IPFS/ENS) with verifiable hashes so the UI does not depend on a single mutable DNS record.
  • Have wallets/users verify spender contract addresses against a signed allowlist and rely on drainer detection plus transaction simulation (Blockaid/MetaMask) as a last line.
  • Monitor DNS records and certificate-transparency logs for unexpected changes and alert; the protocols that survived these waves caught the takeover via monitoring.

References

Related vulnerabilities

All Web3 →