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:
- 4.3.1
- 3.4.2
- 3.4.2-solc-0.7
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 security@openzeppelin.com.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @openzeppelin/contracts | >= 4.0.0, < 4.3.1, >= 3.3.0, < 3.4.2 | 4.3.1, 3.4.2 |
References
- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-fg47-3c2x-m2wr
- https://nvd.nist.gov/vuln/detail/CVE-2021-39167
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/cec4f2ef57495d8b1742d62846da212515d99dd5
- https://github.com/OpenZeppelin/openzeppelin-contracts
- https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md#431
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H- Weakness (CWE)
CWE-269- Platform
- npm
- Package
@openzeppelin/contracts- Disclosed
- 30.08.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-fg47-3c2x-m2wr - CC BY 4.0
Vulnerability history: @openzeppelin/contracts
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 20
- First → latest
- 08.2021 07.2025
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 5
- Medium 12
- Low 1
Disclosures per year
- 2021: 4
- 2022: 7
- 2023: 7
- 2024: 1
- 2025: 1
- 2026: 0
-
TimelockController vulnerability in OpenZeppelin Contracts this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.