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

CVE-2021-46320: Improper Initialization

February 4, 2022 (updated February 9, 2022)

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.

References

  • github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx
  • nvd.nist.gov/vuln/detail/CVE-2021-46320

Code Behaviors & Features

Detect and mitigate CVE-2021-46320 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 up to 4.4.0

Fixed versions

  • 4.4.1

Solution

Upgrade to version 4.4.1 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-665: Improper Initialization

Source file

npm/@openzeppelin/contracts/CVE-2021-46320.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Mon, 12 May 2025 12:15:06 +0000.