🛡️ CVE-2021-46320 — contracts

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-665 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

OpenZeppelin Contracts initializer reentrancy may lead to double initialization

Impact

Initializer functions that are invoked separate from contract creation (the most prominent example being minimal proxies) may be reentered if they make an untrusted non-view external call.

Once an initializer has finished running it can never be re-executed. However, an exception put in place to support multiple inheritance made reentrancy possible in the scenario described above, breaking the expectation that there is a single execution.

Note that upgradeable proxies are commonly initialized together with contract creation, where reentrancy is not feasible, so the impact of this issue is believed to be minor.

Patches

A fix is included in the version v4.4.1 of @openzeppelin/contracts and @openzeppelin/contracts-upgradeable.

Workarounds

Avoid untrusted external calls during initialization.

References

https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006

Credits

This issue was identified and reported by @chaitinblockchain through [our bug bounty on Immunefi](https://immunefi.com/bounty/openzeppelin/).

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.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability none.

Affected software

CVE-2021-46320 is recorded against 2 packages.

  • @openzeppelin/contracts
  • @openzeppelin/contracts-upgradeable

Timeline and source

Published on 5 February 2022 and last revised on 16 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
github.com (Web)

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CWE CWE-665
Public Exploit ✅ No
Source OSV
Published 2022-02-05
Updated 2026-08-12
Modified 2026-07-16
Fix URL N/A

Affected Packages

Software From version Fixed in
@openzeppelin/contracts
@openzeppelin/contracts-upgradeable

Similar Threats

Site Security Check

Is contracts part of your stack?

CVE-2021-46320 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.