CVE-2023-34234: Governor proposal creation may be blocked by frontrunning in OpenZeppelin
Impact
By frontrunning the creation of a proposal, an attacker can become the proposer and gain the ability to cancel it. The attacker can do this repeatedly to try to prevent a proposal from being proposed at all.
This impacts the Governor contract in v4.9.0 only, and the GovernorCompatibilityBravo contract since v4.3.0.
Patches
The problem has been patched in 4.9.1 by introducing opt-in frontrunning protection.
Workarounds
Submit the proposal creation transaction to an endpoint with frontrunning protection.
Credit
Reported by Lior Abadi and Joaquin Pereyra from Coinspect.
References
https://www.coinspect.com/openzeppelin-governor-dos/
Other sources
OpenZeppelin Contracts is a library for smart contract development. By frontrunning the creation of a proposal, an attacker can become the proposer and gain the ability to cancel it. The attacker can do this repeatedly to try to prevent a proposal from being proposed at all. This impacts the Governor contract in v4.9.0 only, and the GovernorCompatibilityBravo contract since v4.3.0. This problem has been patched in 4.9.1 by introducing opt-in frontrunning protection. Users are advised to upgrade. Users unable to upgrade may submit the proposal creation transaction to an endpoint with frontrunning protection as a workaround.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/@openzeppelin/contracts-upgradeableto a version that resolves this vulnerability.Fixed in 4.9.1 - Upgrade
Upgrade
npm/@openzeppelin/contractsto a version that resolves this vulnerability.Fixed in 4.9.1 - Upgrade
Upgrade
OpenZeppelin Contracts Governorto a version that resolves this vulnerability.Fixed in 4.9.1 - Compensating control
For Governor contract instances that cannot be upgraded (affected in v4.9.0 and GovernorCompatibilityBravo since v4.3.0), submit the proposal creation transaction to an endpoint with frontrunning protection.
Event History
Frequently Asked Questions
What is CVE-2023-34234?
CVE-2023-34234 is a vulnerability in the OpenZeppelin Contracts library that allows an attacker to frontrun the creation of a proposal and cancel it, potentially preventing the proposal from being proposed at all.
How does CVE-2023-34234 impact OpenZeppelin Contracts?
CVE-2023-34234 impacts OpenZeppelin Contracts by allowing an attacker to become the proposer of a proposal and gain the ability to cancel it repeatedly, potentially disrupting the proposal process.
What is the severity of CVE-2023-34234?
CVE-2023-34234 has a severity level of 5.3 (Medium).
Which software versions are affected by CVE-2023-34234?
OpenZeppelin Contracts versions 4.3.0 to 4.9.1 and OpenZeppelin Contracts Upgradeable versions 4.3.0 to 4.9.1 are affected by CVE-2023-34234.
How can I mitigate CVE-2023-34234?
To mitigate CVE-2023-34234, it is recommended to update to a version of OpenZeppelin Contracts or OpenZeppelin Contracts Upgradeable that is not affected by the vulnerability.