Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @openzeppelin/contracts
  4. ›
  5. CVE-2022-39384

CVE-2022-39384: Improper Initialization

November 4, 2022 (updated December 6, 2022)

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.

References

  • github.com/OpenZeppelin/openzeppelin-contracts/pull/3006
  • github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx
  • nvd.nist.gov/vuln/detail/CVE-2022-39384

Code Behaviors & Features

Detect and mitigate CVE-2022-39384 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.2.0 before 4.4.1

Fixed versions

  • 4.4.1

Solution

Upgrade to version 4.4.1 or above.

Impact 5.6 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-665: Improper Initialization

Source file

npm/@openzeppelin/contracts/CVE-2022-39384.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:07 +0000.