@openzeppelin/contracts-upgradeable
Affected
- introduced
4.0.0, fixed4.3.1(semver)
Fixed versions
4.3.1
Fix
- Fixed version
4.3.1npm install @openzeppelin/[email protected]
Advisory
Also known as: CVE-2021-39168
TimelockController vulnerability in OpenZeppelin Contracts
Impact
A vulnerability in TimelockController allowed an actor with the executor role to take immediate control of the timelock, by resetting the delay to 0 and escalating privileges, thus gaining unrestricted access to assets held in the contract. Instances with the executor role set to "open" allow anyone to use the executor role, thus leaving the timelock at risk of being taken over by an attacker.
Patches
A fix is included in the following releases of @openzeppelin/contracts and @openzeppelin/contracts-upgradeable:
Deployed instances of TimelockController should be replaced with a fixed version by migrating all assets, ownership, and roles.
Workarounds
Revoke the executor role from accounts not strictly under the team's control. We recommend revoking all executors that are not also proposers. When applying this mitigation, ensure there is at least one proposer and executor remaining.
References
Credits
The issue was identified by an anonymous white hat hacker through Immunefi.
For more information
If you have any questions or comments about this advisory, or need assistance executing the mitigation, email us at [email protected].
Critical Basis: The source's own band: CRITICAL
4.0.0, fixed 4.3.1 (semver)4.3.1
4.3.1npm install @openzeppelin/[email protected]3.3.0, fixed 3.4.2 (semver)3.4.2
3.4.2npm install @openzeppelin/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0