{"id":"CVE-2022-39384","published":"2022-11-04T00:00:00Z","modified":"2025-04-23T16:40:28Z","title":"OpenZeppelin Contracts initializer reentrancy may lead to double initialization","vendor":"OpenZeppelin","product":"openzeppelin-contracts","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.6,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00677,"percentile":0.53207,"provenance":"source"},"cwes":[{"id":"CWE-665","name":"Improper Initialization"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx","tags":[]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006","tags":[]}],"priority":{"score":14.6,"factors":[{"name":"EPSS percentile","points":10.64},{"name":"CVSS severity","points":3.92}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"openzeppelin-contracts","versions":[">= 3.2.0, < 4.4.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T13:55:05.800336Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@openzeppelin/contracts","vulnerableRanges":[">=3.2.0, <4.4.1"],"patched":["4.4.1"],"from":["GHSA-9c22-pwxw-p6hx"],"provenance":"source"},{"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","vulnerableRanges":[">=3.2.0, <4.4.1"],"patched":["4.4.1"],"from":["GHSA-9c22-pwxw-p6hx"],"provenance":"source"}],"summary":{"text":"OpenZeppelin Contracts, the smart contract development library, has a flaw in its initializer handling that affects contracts whose initializer functions run separately from contract creation, such as minimal proxies. An attacker can exploit it when the initializer makes an untrusted non-view external call, which allows reentry so that the initializer executes a second time, with the conditions being that the attacker can make the external call and the initializer runs outside creation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:45:28Z"},"euvd":{"id":"EUVD-2021-2492","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-openzeppelin-contracts-cve-2021-46320","parents":[{"from":"CVE-2021-46320","to":"CVE-2022-39384","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-9c22-pwxw-p6hx","via":"reference","url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx"},{"kind":"osv-related","provenance":"source","id":"GHSA-88g8-f5mf-f5rj","via":"reference","url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx"},{"kind":"similar","provenance":"machine","score":0.83,"basis":"same package + description similarity"}]}],"packageHistory":[{"cve":"CVE-2021-39167","published":"2021-08-26","fixed":"4.3.1","kev":false},{"cve":"CVE-2021-41264","published":"2021-11-12","fixed":"4.3.2","kev":false,"link":{"from":"CVE-2021-41264","to":"CVE-2022-39384","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts","fromFixed":"4.3.2","toFixed":"4.4.1","daysApart":357},{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts-upgradeable","fromFixed":"4.3.2","toFixed":"4.4.1","daysApart":357}]}},{"cve":"CVE-2021-46320","published":"2022-02-04","fixed":"4.4.1","kev":false},{"cve":"CVE-2022-39384","published":"2022-11-04","fixed":"4.4.1","kev":false},{"cve":"CVE-2022-31170","published":"2022-07-21","fixed":"4.7.1","kev":false},{"cve":"CVE-2022-31172","published":"2022-07-21","fixed":"4.7.1","kev":false},{"cve":"CVE-2022-31198","published":"2022-08-01","fixed":"4.7.2","kev":false}],"package":"npm:@openzeppelin/contracts"}}