Ecosyste.ms: Advisories

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

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWZnNDctM2MyeC1tMndy

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-fg47-3c2x-m2wr
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWZnNDctM2MyeC1tMndy
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-fg47-3c2x-m2wr, CVE-2021-39167
References: Repository: https://github.com/OpenZeppelin/openzeppelin-contracts
Blast Radius: 45.4

Affected Packages

npm:@openzeppelin/contracts
Dependent packages: 3,207
Dependent repositories: 34,743
Downloads: 1,490,141 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: 2.3.0, 2.4.0, 2.5.0, 2.5.1, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 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.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