Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. wasmtime
  4. ›
  5. CVE-2022-39392

CVE-2022-39392: Wasmtime out of bounds read/write with zero-memory-pages configuration

November 10, 2022 (updated May 2, 2025)

There is a bug in Wasmtime’s implementation of its pooling instance allocator when the allocator is configured to give WebAssembly instances a maximum of zero pages of memory. In this configuration the virtual memory mapping for WebAssembly memories did not meet the compiler-required configuration requirements for safely executing WebAssembly modules. Wasmtime’s default settings require virtual memory page faults to indicate that wasm reads/writes are out-of-bounds, but the pooling allocator’s configuration would not create an appropriate virtual memory mapping for this meaning out of bounds reads/writes can successfully read/write memory unrelated to the wasm sandbox within range of the base address of the memory mapping created by the pooling allocator.

References

  • github.com/advisories/GHSA-44mr-8vmm-wjhg
  • github.com/bytecodealliance/wasmtime
  • github.com/bytecodealliance/wasmtime/commit/e60c3742904ccbb3e26da201c9221c38a4981d72
  • github.com/bytecodealliance/wasmtime/security/advisories/GHSA-44mr-8vmm-wjhg
  • groups.google.com/a/bytecodealliance.org/g/sec-announce/c/c1HBDDJwNPA
  • nvd.nist.gov/vuln/detail/CVE-2022-39392
  • rustsec.org/advisories/RUSTSEC-2022-0076.html
  • rustsec.org/advisories/RUSTSEC-2022-0102.html

Code Behaviors & Features

Detect and mitigate CVE-2022-39392 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.0.2, all versions starting from 2.0.0 before 2.0.2

Fixed versions

  • 2.0.2
  • 1.0.2

Solution

Upgrade to versions 1.0.2, 2.0.2 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-125: Out-of-bounds Read
  • CWE-787: Out-of-bounds Write

Source file

cargo/wasmtime/CVE-2022-39392.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:11 +0000.