Twitxy Saved

Patrick Collins

Verified account Cyfrin Audits

@PatrickAlphaC

Co-founder of 🛡️@cyfrin | 🟪 @soloditofficial | 🦅 @codehawks | 🎓 @cyfrinupdraft | ⚔️ @battlechain
Level up Web3 cyfrin.io Joined September 2019
4.6K Following 112K Followers 33K Posts

Latest posts 5

Patrick Collins Verified account @PatrickAlphaC
whoops-a-daisy
Charles Guillemet Verified account @P3b7_ Jun 22
🚨Taiko drained for ~$1.7M. Root cause: a private key committed to a public GitHub repo.

enclave-key.pem, the RSA key used to sign all of Taiko's SGX enclaves, sat in the public taikoxyz/raiko repo. That key is the whole trust model.

The attacker derived MrSigner from the public key, signed their own malicious enclave with the leaked key, and registered as a trusted prover. The L1 contracts trust any enclave whose MrSigner matches. It matched.

From there: forged SGX attestations on fake L2 blocks, processMessage() sets the message to RETRIABLE, retryMessage() does zero proof verification, funds leave.

No key theft. No social engineering. No SGX exploit. Just a .pem in a public repo.

Good opportunity to recall that SGX is broken. But here, nobody even had to break it.

It's just yet another key management failure. The whole system was only ever as strong as the secrecy of one RSA key, and that secrecy depended on a human not running git add . on the wrong folder. AI greps every commit of every public repo at machine speed. Assume that is already happening.

The only real exit: a verifier that checks a succinct validity proof of the L2 state transition. It trusts no enclave, no MrSigner, no operator discipline. It checks the math. In that world this exact attack becomes cryptographically impossible rather than operationally unlikely, because there is no privileged key whose leak forges the entire system. There is just a proof.

Stay safe.
View quoted post on X