TGViewer
Libre Blockchain Libre Blockchain @librehash · 2.49K subscribers
Post #30446 290
Breaking Down the Vulnerability in All Safe Contracts Using Common Sense Language: (Part One/Four)

To be clear, these are the problematic lines of code in every version of Safe's multi-signature upgradeable proxy contracts (specifically their singleton/masterCopy/implementation deployment; the Fallback and Factory contracts are not impacted):


solidity
} else if (v > 30) {
// To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover
currentOwner = ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", dataHash)), v - 4, r, s);
} else {
// Use ecrecover with the messageHash for EOA signatures
currentOwner = ecrecover(dataHash, v, r, s);
}


These faulty lines of code are in every single deployed Safe (masterCopy/singleton/implementation) contract for each version release of Safe.

Specifically, I'm referring to (contracts for those addresses on Ethereum / main net):

A) Version 1.1.1
=
0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F

B) Version 1.2.0 = 0x6851D6fDFAfD08c0295C392436245E5bc78B0185

C) Version 1.3.0 = 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552

D) Version 1.4.0 = 0x29fcB43b46531BcA003ddC8FCB67FFE91900C762

EIP-191 is a standard for verifying personal sign messages. Its outlined fairly thoroughly here: https://eips.ethereum.org/EIPS/eip-191

EIP-712 is a signature standard for verifying transaction data. That, too, is outlined very thoroughly here: https://eips.ethereum.org/EIPS/eip-712 .

The screenshot attached to this message shows how wallets that employ the EIP-712 standard are supposed to correctly dissect and display EIP-712 encoded transaction data for end users when their signature is being requested for said data (usually by a DApp or web3 app of some sort). That screenshot provides a rough reflection of what the owners of the Bybit exchange were looking at before they signed whatever transaction resulted in $1.5 billion in funds being compromised. (However this is not an indictment of those exchange owners by any means)
More from @librehash
  1. Oct 9, 2026I'm back.
  2. Jun 10, 2026Until an adequate quantum-safe migration plan is proposed with a concrete timeline for imp…
  3. Jun 10, 2026The quantum clock is ticking: it's Bitcoin's problem, not Ethereum's https://www.coindesk.…
  4. Oct 30, 2025Update Regarding the Meeting Between Trump & Xi Jinping in South Korea Trump recently conc…
  5. Oct 17, 2025■□□□□ ℹ️ Data-Leak: Price sheet of 200+ crypto influencers and their wallet addresses from…
  6. Oct 16, 2025DPRK Adopts EtherHiding: Nation-State Malware Hiding on Blockchains. EtherHiding, a novel…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →