{"id":"CVE-2021-46320","aliases":["CVE-2021-46320","GHSA-88g8-f5mf-f5rj","GHSA-9c22-pwxw-p6hx"],"related":["CVE-2022-39384"],"kind":"vulnerability","state":"published","title":"Improper Initialization in OpenZeppelin","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nInitializer 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.\n\nOnce 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.\n\nNote 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.\n\n### Patches\n\nA fix is included in the version v4.4.1 of `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable`.\n\n### Workarounds\n\nAvoid untrusted external calls during initialization.\n\n### References\nhttps://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006\n\n### Credits\n\nThis issue was identified and reported by @chaitinblockchain through [our bug bounty on Immunefi](https://immunefi.com/bounty/openzeppelin/).\n\n### For more information\n\nIf you have any questions or comments about this advisory, or need assistance executing the mitigation, email us at security@openzeppelin.com.","format":"markdown","source":"ghsa"},{"lang":"es","text":"En OpenZeppelin versiones anteriores a v4.4.0 incluyéndola, las funciones del inicializador que son invocadas de forma independiente a la creación del contrato (el ejemplo más destacado son los proxies mínimos) pueden volver a entrar si realizan una llamada externa no confiable. Una vez que un inicializador ha terminado de ejecutarse no puede volver a ejecutarse. Sin embargo, una excepción puesta en marcha para soportar la herencia múltiple hizo posible la reentrada, rompiendo la expectativa de que se presenta una única ejecución","source":"nvd"}],"published":"2021-12-14T21:47:33.000Z","modified":"2026-07-16T03:59:27.534Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","score":5.6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-665"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.4.1"}],"ecosystem":"npm","package":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"4.4.1"}],"ecosystem":"npm","package":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"4.4.1"}],"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.2.0","lastAffected":"4.4.0"}],"vendor":"openzeppelin","product":"openzeppelin","cpe":"cpe:2.3:a:openzeppelin:openzeppelin:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46320","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.4.1","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39384","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-46320","url":"https://www.cve.org/CVERecord?id=CVE-2021-46320","licence":"CVE Terms of Use","modified":"2024-08-04T05:02:11.583Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-88g8-f5mf-f5rj","url":"https://github.com/advisories/GHSA-88g8-f5mf-f5rj","licence":"CC-BY-4.0","modified":"2026-07-16T03:56:17.546Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9c22-pwxw-p6hx","url":"https://github.com/advisories/GHSA-9c22-pwxw-p6hx","licence":"CC-BY-4.0","modified":"2026-07-16T03:59:27.534Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-46320","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46320","licence":"Public domain","modified":"2026-06-17T04:14:43.983Z"}],"updatedAt":"2026-11-25T22:58:06.768Z","epss":{"score":0.01257,"percentile":0.70388,"date":"2026-12-01T12:00:22.000Z"}}