skip to Main Content
bitcoin
Bitcoin (BTC) $ 96,575.88 1.13%
ethereum
Ethereum (ETH) $ 3,408.66 1.67%
tether
Tether (USDT) $ 0.99899 0.01%
xrp
XRP (XRP) $ 2.20 1.40%
bnb
BNB (BNB) $ 705.37 3.12%
solana
Solana (SOL) $ 190.52 0.97%
dogecoin
Dogecoin (DOGE) $ 0.319263 0.97%
usd-coin
USDC (USDC) $ 1.00 0.05%
staked-ether
Lido Staked Ether (STETH) $ 3,403.32 1.60%
cardano
Cardano (ADA) $ 0.899818 3.57%

ZenGo uncovers ‘red pill attack’ vulnerability in popular Web3 apps

The vulnerability has since been patched, although it affected several leading transaction simulation vendors.

411 Total views

3 Total shares

ZenGo uncovers 'red pill attack' vulnerability in popular Web3 apps

Own this piece of history

Collect this article as an NFT

According to a blog post published by developers of crypto wallet ZenGo, the firm said it had uncovered security vulnerabilities in transaction simulation solutions used by popular decentralized applications, or dApps. Dubbed the “red pill attack,” this vulnerability allowed malicious dApps to steal user assets based on opaque transaction approvals offered to and approved by users. The vulnerability derives its name from the iconic “red pill” scene from The Matrix movie series. 

“If malware is able to detect its actually being executed in a simulated environment or living in the matrix, it can behave in a benign manner, thus deceiving the anti-malware solution, and reveal its true malicious nature only when actually executed in a real environment.”

ZenGo claimed its research revealed that many leading vendors, including Coinbase Wallet, were at one point in time vulnerable to such attacks. “All vendors were very receptive to our reports,” said ZenGo, “and most of them were quick to fix their faulty implementations.”

The vulnerability is possible due to a programming oversight in “Special Variables” among smart contracts storing general information on the blockchain functionality, such as timestamp of the current block. During simulations however, ZenGo says there is no correct value for Special Variables and claims developers “take a shortcut” and set them to an arbitrary value.

“For example, the “COINBASE” instruction contains the address of the current block miner. Since during simulation there is no real block and hence no miner, some simulation implementations just set it to the null address (all zeros address).”

In a video, ZenGo developers demonstrated how a smart contract simulation on Polygon (MATIC) asks users to send native coins in exchange for another could be compromised via this method:

“When the user actually sends the transaction on-chain, COINBASE [Wallet] is actually filled with the non-zero address of the current miner and the contract just takes the sent coins.”

ZenGo said the fix for the vulnerability was straightforward: “instead of populating these vulnerable variables with arbitrary values, the simulations need to populate them with meaningful values.” The firm presented redacted screenshots of bug bounties, apparently awarded by Coinbase, for solving the issue. The Ethereum Foundation has also awarded ZenGo a $50,000 grant for its research on transaction simulations.

Quick shoutout to security researcher @0xVazi from @ZenGo who made some helpful, proactive suggestions recently!

We love working together with others in the security space to keep everyone safe

— Pocket Universe (@PocketUniverseZ) January 27, 2023

Loading data ...
Comparison
View chart compare
View table compare
Back To Top