Vulnerable GovernorVotesQuorumFraction version
The protocol used an outdated version of OpenZeppelin contracts containing a known vulnerability in the GovernorVotesQuorumFraction contract. An attacker could potentially exploit this to manipulate governance quorum, though the exact impact is not detailed in the text.
Source: https://github.com/sherlock-audit/2023-01-uxd-judging/issues/423
Found by
ctf_sec, HonorLt
Summary
The protocol uses an OZ version of contracts that contain a known vulnerability in government contracts.
Vulnerability Detail
UXDGovernor contract inherits from GovernorVotesQuorumFraction:
contract UXDGovernor is
ReentrancyGuard,
Governor,
GovernorVotes,
GovernorVotesQuorumFraction,
GovernorTimelockControl,
GovernorCountingSimple,
GovernorSettings
An OZ security recommendation has revealed a known vulnerability in this contract: https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-xrc4-737v-9q75
It was patched in version 4.7.2, but this protocol uses an older version: "@openzeppelin/contracts": "^4.6.0"
Impact
The potential impact is described in the OZ advisory. This issue was assigned with a severity of High from OZ, so I am sticking with it in this submission.
Code Snippet
https://github.com/sherlock-audit/2023-01-uxd/blob/main/contracts/governance/UXDGovernor.sol#L37
Tool used
Manual Review
Recommendation
Update the OZ version of contracts to version >=4.7.2 or at least follow the workarounds of OZ if not possible otherwise.
Discussion
WarTech9
This was already fixed here: https://github.com/UXDProtocol/uxd-evm/commit/dcaa0e857111f3f7946ee5c5a188dbb23ca80859
hrishibhat
This requires certain scenario where the previous quorum should have failed & the quorum fraction has to be changed post which this issue could be valid. Considering this issue a valid medium.
IAm0x52
Fix looks good. Contract version has been updated
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the use of an outdated OpenZeppelin contracts version (4.6.0) that contains a known vulnerability in GovernorVotesQuorumFraction, patched in 4.7.2.
Impact
The potential impact is as described in the OpenZeppelin advisory, which rated it High; the judge noted it requires a specific scenario where the previous quorum should have failed and the quorum fraction is changed, and considered it a valid medium.
What the attacker needed
Governance quorum previously failed; quorum fraction changed afterwards
The fix
The OpenZeppelin contracts version was updated to at least 4.7.2, as confirmed by the fix commit.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report is about a smart contract that helps manage voting in a decentralised organisation. The contract used an old version of a widely used library that had a known security flaw, which could let someone mess with the voting rules. The fix is simply to update the library to a newer, safe version.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.