Most people on X have never heard of Ethernal. Developers have.
It's an open-source block explorer for EVM chains: in a few seconds a team spins up an explorer for its testnet, rollup or app chain, self-hosted or on Ethernal's hosted service. On GitHub, 275 stars and 73 forks, and its backend image has been pulled about 47,000 times. Tools like this sit under a lot of chains, and almost nobody reads their code.
@r00k0x, who leads security research at HEY, did. He found two bugs.
1. The secret that was never set (Critical, 9.8)
Ethernal's sign-in had a path for internal calls: a request carrying a user id and a secret equal to the server's AUTH_SECRET was let in.
If AUTH_SECRET was never set, it's undefined. A request that leaves the secret out is undefined too. undefined === undefined is true.
The official self-hosted installer never wrote that variable, and the hosted service hadn't set it either. The user id was free: a public, no-login explorer lookup returned the admin's id.
Three requests took over an explorer:
- read the admin's id from the public lookup
- call the account route as that admin and get its API token
- read the faucet wallet's private key the same way
All 72 protected routes worked like this: point an explorer at your own node, edit contracts, delete the explorer.
2. A loop that never ends (High, 7.5)
Contract verification strips Solidity's metadata from the end of the bytecode, in a loop, then appends the caller's constructor arguments. Send 51 bytes ending in 0033 and every pass cuts exactly what it adds back. The loop never exits. One request with no login held the backend at 99% CPU until restart.
How r00k proved it: Ethernal's own code, unchanged, on 127.0.0.1, with canary data. Nothing touched Ethernal's servers or any explorer anyone runs.
What happened next: the @tryethernal team confirmed both, closed the hosted service the same day, shipped 5.19.5 and published both advisories with our credit within a day. We re-tested the fix and both pass. Thanks @adechevigne 🤝
If you self-host Ethernal:
1. Update to 5.19.5
2. Rotate every API key and token. One taken before the fix keeps working until you do
3. Move the faucet's funds to a new wallet
Advisories: GHSA-h95w-84r3-2wmx and GHSA-gcv3-72c3-2jq3 on tryethernal/ethernal.
The lesson keeps repeating. The contracts get reviewed. The code around them, the explorer, the relayer, the backend that holds a key, often gets nobody reading it.
Popular on GitHub, quiet on X, and holding keys for other people's chains: that's exactly the code we read.
Our reviews are free until 15 December, and we choose which projects we take on. After that, reviews are paid. If your code is public, DMs are open.