// For flags

CVE-2022-39384

OpenZeppelin Contracts initializer reentrancy may lead to double initialization

Severity Score

5.6
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
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.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
Attack Vector
Network
Attack Complexity
High
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
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
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