# CVE-2021-39167: OpenZeppelin Contracts TimelockController privilege escalation

Source: https://junglewise.ai/threats/cve-2021-39167-openzeppelin-contracts-timelockcontroller-privilege-escalation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-08-30. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2021-39167 · Severity: low · CVSS 3.1 · Published 2021-08-30

OpenZeppelin Contracts provides reusable Solidity smart contract components used to secure blockchain applications. A vulnerability in the TimelockController—a contract that enforces time delays on sensitive operations—allowed actors with executor privileges to bypass security controls and seize complete control of the timelock, including all assets and functions protected by it. This could enable complete compromise of governance systems and theft of funds.

Technologies: [OpenZeppelin Contracts](https://junglewise.ai/threats/technologies/contracts), [OpenZeppelin Contracts Upgradeable](https://junglewise.ai/threats/technologies/contracts-upgradeable). Vendors: [OpenZeppelin](https://junglewise.ai/threats/vendors/openzeppelin).

## Quick answers

**Is CVE-2021-39167 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-39167 being exploited in the wild.

**How severe is CVE-2021-39167?** Low severity, with a CVSS score of 3.1, published 30 August 2021.

**Which products and versions are affected?** OpenZeppelin Contracts 4.0.0 through 4.3.0, 3.3.0 through 3.4.1, 3.3.0-solc-0.7, 3.4.0-solc-0.7, 3.4.1-solc-0.7-2; OpenZeppelin Contracts Upgradeable 4.0.0 through 4.3.0, 3.3.0 through 3.4.1, 3.3.0-solc-0.7, 3.4.0-solc-0.7, 3.4.1-solc-0.7-2.

**Is there a fix for CVE-2021-39167?** A patch was published on 2021-08-27: Patches released in versions 4.3.1, 3.4.2, and 3.4.2-solc-0.7 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-39167 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-39167?** Check whether you run OpenZeppelin Contracts or OpenZeppelin Contracts Upgradeable at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a privilege escalation (CWE-266) in TimelockController. An attacker with the executor role could reset the delay parameter to 0 and escalate their privileges to gain unrestricted access to all assets and functions held in the contract. The risk is particularly severe if the executor role is configured as "open," allowing any network-accessible caller to assume the executor role without authentication. The fix is available in OpenZeppelin Contracts 4.3.1, 3.4.2, and 3.4.2-solc-0.7. Deployed instances must be migrated to patched versions by re-deploying the contract and transferring all assets and roles.

## Affected products

- OpenZeppelin Contracts 4.0.0 through 4.3.0, 3.3.0 through 3.4.1, 3.3.0-solc-0.7, 3.4.0-solc-0.7, 3.4.1-solc-0.7-2
- OpenZeppelin Contracts Upgradeable 4.0.0 through 4.3.0, 3.3.0 through 3.4.1, 3.3.0-solc-0.7, 3.4.0-solc-0.7, 3.4.1-solc-0.7-2

## Identifiers

- CVE-2021-39167
- GHSA-fg47-3c2x-m2wr

## Timeline

- 2021-08-27: disclosed: Publicly disclosed via GitHub advisory
- 2021-08-27: patched: Patches released in versions 4.3.1, 3.4.2, and 3.4.2-solc-0.7

## References

- [https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-fg47-3c2x-m2wr](https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-fg47-3c2x-m2wr)

## Related threats

- [OpenZeppelin Contracts information disclosure in VestingWalletConfidential](https://junglewise.ai/threats/openzeppelin-confidential-contracts-vestingwalletconfidential-a-14aa72cf)
- [OpenZeppelin Contracts out-of-bounds memory access in Bytes.lastIndexOf](https://junglewise.ai/threats/cve-2025-54070-openzeppelin-contracts-out-of-bounds-memory-access-in-bytes)
- [OpenZeppelin Contracts base64 encoding reads from dirty memory](https://junglewise.ai/threats/cve-2024-27094-openzeppelin-contracts-base64-encoding-reads-from-dirty-memory)
- [OpenZeppelin Contracts duplicated execution in Multicall](https://junglewise.ai/threats/cve-2023-49798-openzeppelin-contracts-duplicated-execution-in-multicall)
- [OpenZeppelin Contracts improper escaping in ERC2771Context](https://junglewise.ai/threats/cve-2023-40014-openzeppelin-contracts-improper-escaping-in-erc2771context)
