Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2021-39168 — @openzeppelin/contracts-u…

CRITICALFix: OpenZeppelin/openzeppelin-contracts@cec4f2e

CVE-2021-39168 is a critical-severity (CVSS 9.8) Improper Privilege Management vulnerability in @openzeppelin/contracts-upgradeable. A fix is available for @openzeppelin/contracts-upgradeable — see the affected versions and patch details below.

TimelockController vulnerability in OpenZeppelin Contracts

Also known asGHSA-vrw4-w73r-6mm8
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs75th percentile — riskier than 75% of all scored CVEsHighest risk
0.00%0.70%1.39%2.09%0.4%1.6%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-39168 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

906other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@openzeppelin/contracts-upgradeablenpm
250Kdownloads / week

Description

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

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npm@openzeppelin/contracts-upgradeable≥ 4.0.0&&< 4.3.14.3.1npm install @openzeppelin/contracts-upgradeable@4.3.1
📦npm@openzeppelin/contracts-upgradeable≥ 3.3.0&&< 3.4.23.4.2npm install @openzeppelin/contracts-upgradeable@3.4.2

Affected Products

1 product · 2 configurations
Application
contractsopenzeppelin
≥ 4.0.0 && < 4.3.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @openzeppelin/contracts-upgradeable, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @openzeppelin/contracts-upgradeable to 4.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-39168 is resolved across your whole dependency graph.

  3. Workarounds

    Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.

Frequently Asked Questions

### 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 `Ti
O3 Security · Impact-Aware SCA

Is CVE-2021-39168 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-39168: @openzeppelin/contracts — Fixed in 4.3.1