// For flags

CVE-2022-23636

Invalid drop of partially-initialized instances in wasmtime

Severity Score

8.1
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Wasmtime is an open source runtime for WebAssembly & WASI. Prior to versions 0.34.1 and 0.33.1, there exists a bug in the pooling instance allocator in Wasmtime's runtime where a failure to instantiate an instance for a module that defines an `externref` global will result in an invalid drop of a `VMExternRef` via an uninitialized pointer. A number of conditions listed in the GitHub Security Advisory must be true in order for an instance to be vulnerable to this issue. Maintainers believe that the effective impact of this bug is relatively small because the usage of `externref` is still uncommon and without a resource limiter configured on the `Store`, which is not the default configuration, it is only possible to trigger the bug from an error returned by `mprotect` or `VirtualAlloc`. Note that on Linux with the `uffd` feature enabled, it is only possible to trigger the bug from a resource limiter as the call to `mprotect` is skipped. The bug has been fixed in 0.34.1 and 0.33.1 and users are encouraged to upgrade as soon as possible. If it is not possible to upgrade to version 0.34.1 or 0.33.1 of the `wasmtime` crate, it is recommend that support for the reference types proposal be disabled by passing `false` to `Config::wasm_reference_types`. Doing so will prevent modules that use `externref` from being loaded entirely.

Wasmtime es un tiempo de ejecución de código abierto para WebAssembly y WASI. En versiones anteriores a 0.34.1 y 0.33.1, se presenta un error en el asignador de instancias de pool en el tiempo de ejecución de Wasmtime donde un fallo al instanciar una instancia para un módulo que define un "externref" global resultará en una caída inválida de un "VMExternRef" por medio de un puntero no inicializado. Para que una instancia sea vulnerable a este problema deben cumplirse una serie de condiciones enumeradas en el aviso de seguridad de GitHub. Los mantenedores creen que el impacto efectivo de este bug es relativamente pequeño porque el uso de "externref" sigue siendo poco común y sin un limitador de recursos configurado en el "Store", que no es la configuración por defecto, sólo es posible desencadenar el bug desde un error devuelto por "mprotect" o "VirtualAlloc". Tenga en cuenta que en Linux con la funcionalidad "uffd" habilitada, sólo es posible desencadenar el fallo desde un limitador de recursos, ya que es omitida la llamada a "mprotect". El bug ha sido corregido en las versiones 0.34.1 y 0.33.1 y es recomendado a usuarios actualizar lo antes posible. Si no es posible actualizar a versión 0.34.1 o 0.33.1 del crate "wasmtime", es recomendado deshabilitar el soporte de la propuesta de tipos de referencia pasando "false" a "Config::wasm_reference_types". Esto evitará que los módulos que usan "externref" sean cargados por completo

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
None
Integrity
None
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-01-19 CVE Reserved
  • 2022-02-16 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-11-01 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-824: Access of Uninitialized Pointer
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Bytecodealliance
Search vendor "Bytecodealliance"
Wasmtime
Search vendor "Bytecodealliance" for product "Wasmtime"
< 0.33.1
Search vendor "Bytecodealliance" for product "Wasmtime" and version " < 0.33.1"
rust
Affected
Bytecodealliance
Search vendor "Bytecodealliance"
Wasmtime
Search vendor "Bytecodealliance" for product "Wasmtime"
0.34.0
Search vendor "Bytecodealliance" for product "Wasmtime" and version "0.34.0"
rust
Affected