OpenZeppelin Contracts initializer reentrancy may lead to double initialization (OpenZeppelin openzeppelin-contracts)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.55 % · percentile 46 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Modified
Description
OpenZeppelin Contracts is a library for secure smart contract development. Before version 4.4.1 but after 3.2.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 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. This issue has been patched, please upgrade to version 4.4.1. As a workaround, avoid untrusted external calls during initialization.
Weaknesses (CWE)
- CWE-665 — Improper Initialization
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L | GitHub_M |
| CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-88g8-f5mf-f5rj — Improper Initialization in OpenZeppelin
- GHSA-9c22-pwxw-p6hx — OpenZeppelin Contracts initializer reentrancy may lead to double initialization
European references
- ENISA EUVD · EUVD-2021-2492
- GCVE · GCVE-0-2022-39384
Affected configurations (NVD CPE)
cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*≥ 3.2.0 < 4.4.1cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:*≥ 3.2.0 < 4.4.1
Affected products
| Product | Versions |
|---|---|
| OpenZeppelin · openzeppelin-contracts | affected >= 3.2.0, < 4.4.1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |