GeoDB Hack
What happened
On October 19, 2022, an attacker minted 10,000,000,000,000,000 BGEO, GeoDB's token on BNB Smart Chain, without authorization. That was 99.99% of the supply.
BGEO's mint function was a bridge mint meant to run only with signatures from GeoDB's authorized signers. The check could be skipped by passing empty signature arrays. PeckShield summed it up as a mint() that allowed unlimited mints.
The large mint went to the attacker's address and stayed there. DeFiHackLabs records a second transaction from the same attacker that minted more BGEO and sold it into the PancakeSwap BGEO/WBNB pool for about 12 WBNB. The realized profit was small because the pool was shallow.
Attacker: 0xde01f6ce91e4f4bdb94bb934d30647d72182320f
Mint transaction: 0x2673936a1191a35c24b60dd697644c953da321b4395b836439faa319b8335886
Swap transaction (per DeFiHackLabs): 0x9f4ef3cc55b016ea6b867807a09f80d1b2e36f6cd6fccfaf0182f46060332c57
How it happened
- BGEO's
mint(_amount, _txHash, receiver, _r, _s, _v)is guarded by anisSignedmodifier. It hashes the chain tag,msg.sender,_txHashand_amount, recovers one signer per(v, r, s)entry withecrecover, and requiresisSigners(_signers). checkSignParamsonly checks that the three arrays have equal length, so three empty arrays pass. The recovery loop then runs zero times,_signersis empty, andisSignersaccepts the empty list. No minimum number of signatures was enforced.- The only other check is that the
_txHashstring has not been used before, so any new string works. - The attacker called
mintwith empty arrays and minted 10,000,000,000,000,000 BGEO to0xde01...320f(tx0x2673936a...5886). - In a separate transaction,
0x9f4ef3cc...2c57, the attacker minted more BGEO the same way and swapped it for about 12 WBNB in the PancakeSwap BGEO/WBNB pair.
Protocol details
Evidence
- report PeckShield alert: BGEO token's mint() allows unlimited mints twitter.com
- report @data_verse incident report twitter.com
- transaction bscscan.com transaction 0x2673…5886 bscscan.com
- address bscscan.com address 0x4760…37a3 bscscan.com
- address bscscan.com address 0xde01…320f bscscan.com
- code DeFiHackLabs BEGO_exp.sol github.com
- code DeFiHackLabs past incidents 2022: 20221020 BEGO - Incorrect signature verification github.com
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.