Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXZydzQtdzczci02bW04

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

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 [email protected].

Permalink: https://github.com/advisories/GHSA-vrw4-w73r-6mm8
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXZydzQtdzczci02bW04
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: over 2 years ago
Updated: about 1 year ago


CVSS Score: 10.0
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Identifiers: GHSA-vrw4-w73r-6mm8, CVE-2021-39168
References: Repository: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
Blast Radius: 36.9

Affected Packages

npm:@openzeppelin/contracts-upgradeable
Dependent packages: 853
Dependent repositories: 4,919
Downloads: 553,028 last month
Affected Version Ranges: >= 3.3.0, < 3.4.2, >= 4.0.0, < 4.3.1
Fixed in: 3.4.2, 4.3.1
All affected versions: 3.3.0, 3.4.0, 3.4.1, 4.0.0, 4.1.0, 4.2.0, 4.3.0
All unaffected versions: 3.2.0, 3.4.2, 4.3.1, 4.3.2, 4.3.3, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.5.1, 4.5.2, 4.6.0, 4.7.0, 4.7.1, 4.7.2, 4.7.3, 4.8.0, 4.8.1, 4.8.2, 4.8.3, 4.9.0, 4.9.1, 4.9.2, 4.9.3, 4.9.4, 4.9.5, 4.9.6, 5.0.0, 5.0.1, 5.0.2