CVE-2021-39167
JSON

10.0critical

TimelockController vulnerability in OpenZeppelin Contracts

Severity
10.0critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.59% (higher than 76% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fg47-3c2x-m2wr

Description

OpenZepplin is a library for smart contract development. In affected versions a vulnerability in TimelockController allowed an actor with the executor role to escalate privileges. Further details about the vulnerability will be disclosed at a later date. As a workaround 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.

Affected

Product or packageVersionsReported by
OpenZeppelin openzeppelin-contracts>=4.0.0, < 4.3.1, >=3.3.0, < 3.4.2, >= 3.3.0-solc-0.7, < 3.4.2-solc-0.7CVE List
@openzeppelin/contracts (npm)from 4.0.0 before 4.3.1, from 3.3.0 before 3.4.2GitHub Advisory Database
openzeppelin contractsfrom 3.3.0 before 3.4.2, from 4.0.0 before 4.3.1NVD

All scores

GitHub_M10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHub10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

OpenZepplin is a library for smart contract development. In affected versions a vulnerability in TimelockController allowed an actor with the executor role to escalate privileges. Further details about the vulnerability will be disclosed at a later date. As a workaround 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.

GitHub Advisory Database
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

Post-mortem.

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.

NVD (es)

OpenZepplin es una biblioteca para el desarrollo de contratos inteligentes. En las versiones afectadas, una vulnerabilidad en TimelockController permitía a un actor con el rol de ejecutor escalar privilegios. Más adelante se divulgarán más detalles sobre la vulnerabilidad. Como solución alternativa, revoque el rol de ejecutor de las cuentas que no estén estrictamente bajo el control del equipo. Recomendamos revocar todos los ejecutores que no sean también proponentes. Cuando aplique esta mitigación, asegúrese de que queda al menos un proponente y un ejecutor.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-39167 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-fg47-3c2x-m2wr changed 2026-07-08CC-BY-4.0
NVDCVE-2021-39167 changed 2026-06-17Public domain