CVE-2021-46320 json
OpenZeppelin Contracts initializer reentrancy may lead to double initialization
published 2021-12-14 4 y ago modified 2026-07-16 3 mo ago also CVE-2022-39384 , GHSA-88g8-f5mf-f5rj , GHSA-9c22-pwxw-p6hx , EUVD-2022-0912
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 68%
- public exploits
- 0
- none known
Summary
In OpenZeppelin <=v4.4.0, 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, breaking the expectation that there is a single execution.
Patch / fix
- npm @openzeppelin/contracts 4.4.1
- npm @openzeppelin/contracts-upgradeable 4.4.1
Exploit prediction
1.22% chance of exploitation in the next 30 days, higher than 68% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 5.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @openzeppelin/contracts | >=3.2.0, <4.4.1 <4.4.1 |
4.4.1 |
| npm | @openzeppelin/contracts-upgradeable | >=3.2.0, <4.4.1 |
4.4.1 |
Classification
- Weakness
-
- CWE-665 Improper Initialization
References
-
github.com
/OpenZeppelin/openzeppelin-contracts/pull/3006
web
-
github.com
/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-39384
advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts
package
-
nvd.nist.gov
/vuln/detail/CVE-2021-46320
advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.4.1
web
Sources
- CVE List CVE-2021-46320
- GitHub Advisory GHSA-9c22-pwxw-p6hx
- GitHub Advisory GHSA-88g8-f5mf-f5rj
- NVD CVE-2021-46320
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.