26516 - [SC - Insight] Gnosis Multisig Contract can become unusable
Submitted on Dec 4th 2023 at 11:54:01 UTC by @copperscrewer for Boost | DeGate
Report ID: #26516
Report type: Smart Contract
Report severity: Insight
Target: https://etherscan.io/address/0x2028834B2c0A36A918c10937EeA71BE4f932da52#code
Impacts:
Multisig Contract can rendered unusable
Description
Bug Description
Gnosis multisig, has 6 owners and 4 required signatures In the event of removing two owners, There would be 4 owners and 4 required signatures. If replaceOwner was done with the zero address, The required signatures will stay to be 4 while an Owner becomes the 0 address leading to an unusable Gnosis multisig Contract
Impact
Gnosis Multisig cannot execute any transaction, cannot add, remove Owners as the contract becomes unusable
Risk Breakdown
Difficulty to Exploit: Easy Weakness: CVSS2 Score: Overall CVSS Score 6.9
Recommendation
Add a notNull modifier to replaceOwner
Proof of concept
steps to reproduce
As we are testing the Gnosis Multisig, that works independently to the L2 contracts, we can test just this contract while replicating the Owners and required state.
Create an empty folder.
npx hardhat init
To create a project with directories like contracts, test
copy paste contract code from https://etherscan.io/address/0x2028834B2c0A36A918c10937EeA71BE4f932da52?utm_source=immunefi#code
to gnosis.sol in contracts folder
change compiler version or directly paste this in module exports in hardhat config.js This is done since the Gnosis multisig contract uses an old version of solidity solidity: { compilers: [ { version: "0.4.22", }, { version: "0.8.19", settings: {}, }, ], },
paste following test script in test folder
Last updated
Was this helpful?