The ODGovernor inherits a vulnerable version (v4.8.0) of OpenZeppelin GovernorCompatibilityBravo contrcat, the vulnerability is regarding trimming proposal calldata as there's no check if the calldatas array equals the signatures array when a proposal is created:
This causes the additional elements of the calldatas array to be ignored, and if the proposal succeeds the corresponding actions would eventually execute without any calldata.
This vulnerability is patched in v4.8.3, read more about it here.
Lines of code
https://github.com/open-dollar/od-contracts/blob/f4f0246bb26277249c1d5afe6201d4d9096e52e6/src/contracts/gov/ODGovernor.sol#L12
Vulnerability details
Impact
The
ODGovernor
inherits a vulnerable version (v4.8.0) of OpenZeppelinGovernorCompatibilityBravo
contrcat, the vulnerability is regarding trimming proposal calldata as there's no check if thecalldatas
array equals thesignatures
array when a proposal is created:where:
This causes the additional elements of the
calldatas
array to be ignored, and if the proposal succeeds the corresponding actions would eventually execute without any calldata.This vulnerability is patched in
v4.8.3
, read more about it here.Proof of Concept
ODGovernor contract
GovernorCompatibilityBravo.propose
function that is currently inherited from the vulnerableGovernorCompatibilityBravo
contractTools Used
Manual Testing.
Recommended Mitigation Steps
Update the OpenZeppelin version of contracts to a version >=4.8.3
Assessed type
Library