CVE-2022-39384
OpenZeppelin Contracts initializer reentrancy may lead to double initialization
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
OpenZeppelin Contracts es una librería para el desarrollo seguro de contratos inteligentes. Antes de la versión 4.4.1 pero después de la 3.2.0, las funciones de inicialización que se invocan por separado de la creación del contrato (el ejemplo más destacado son los servidores proxy mínimos) se pueden volver a ingresar si realizan una llamada externa sin vista que no sea de confianza. Una vez que un inicializador ha terminado de ejecutarse, nunca podrá volver a ejecutarse. Sin embargo, una excepción implementada para admitir la herencia múltiple hizo posible la reentrada en el escenario descrito anteriormente, rompiendo la expectativa de que haya una ejecución única. Tenga en cuenta que los proxies actualizables normalmente se inicializan junto con la creación del contrato, donde la reentrada no es factible, por lo que se cree que el impacto de este problema es menor. Este problema ha sido solucionado; actualice a la versión 4.4.1. Como workaround, evite llamadas externas que no sean de confianza durante la inicialización.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-09-02 CVE Reserved
- 2022-11-04 CVE Published
- 2024-05-27 EPSS Updated
- 2024-08-03 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-665: Improper Initialization
CAPEC
References (2)
URL | Tag | Source |
---|---|---|
https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9c22-pwxw-p6hx | Third Party Advisory |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3006 | 2022-12-06 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Openzeppelin Search vendor "Openzeppelin" | Contracts Search vendor "Openzeppelin" for product "Contracts" | >= 3.2.0 < 4.4.1 Search vendor "Openzeppelin" for product "Contracts" and version " >= 3.2.0 < 4.4.1" | node.js |
Affected
| ||||||
Openzeppelin Search vendor "Openzeppelin" | Contracts Upgradeable Search vendor "Openzeppelin" for product "Contracts Upgradeable" | >= 3.2.0 < 4.4.1 Search vendor "Openzeppelin" for product "Contracts Upgradeable" and version " >= 3.2.0 < 4.4.1" | node.js |
Affected
|