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

CVE-2026-35186: Wasmtime has improperly masked return value from `table.grow` with Winch compiler backend

April 10, 2026

Wasmtime’s Winch compiler backend contains a bug where translating the table.grow operator causes the result to be incorrectly typed. For 32-bit tables this means that the result of the operator, internally in Winch, is tagged as a 64-bit value instead of a 32-bit value. This invalid internal representation of Winch’s compiler state compounds into further issues depending on how the value is consumed.

One example can be seen when the result of table.grow is used as the address of a load operation. The load operation is tricked into thinking the address is a 64-bit value, not a 32-bit value, which means that the final address to load from is calculated incorrectly. This can lead to a situation where the bytes before the start of linear memory can be loaded/stored to.

The primary consequence of this bug is that bytes in the host’s address space can be stored/read from. This is only applicable to the 16 bytes before linear memory, however, as the only significant return value of table.grow that can be misinterpreted is -1. The bytes before linear memory are, by default, unmapped memory. Wasmtime will detect this fault and abort the process, however, because wasm should not be able to access these bytes.

Overall this this bug in Winch represents a DoS vector by crashing the host process, a correctness issue within Winch, and a possible leak of up to 16-bytes before linear memory. Wasmtime’s default compiler is Cranelift, not Winch, and Wasmtime’s default settings are to place guard pages before linear memory. This means that Wasmtime’s default configuration is not affected by this issue, and when explicitly choosing Winch Wasmtime’s otherwise default configuration leads to a DoS. Disabling guard pages before linear memory is required to possibly leak up to 16-bytes of host data.

References

  • github.com/advisories/GHSA-f984-pcp8-v2p7
  • github.com/bytecodealliance/wasmtime
  • github.com/bytecodealliance/wasmtime/security/advisories/GHSA-f984-pcp8-v2p7
  • nvd.nist.gov/vuln/detail/CVE-2026-35186
  • rustsec.org/advisories/RUSTSEC-2026-0094.html

Code Behaviors & Features

Detect and mitigate CVE-2026-35186 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 starting from 25.0.0 before 36.0.7, all versions starting from 37.0.0 before 42.0.2, all versions starting from 43.0.0 before 43.0.1, version 43.0.0

Fixed versions

  • 36.0.7
  • 42.0.2
  • 43.0.1

Solution

Upgrade to versions 36.0.7, 42.0.2, 43.0.1 or above.

Impact 6.4 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-789: Memory Allocation with Excessive Size Value

Source file

cargo/wasmtime/CVE-2026-35186.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 09 May 2026 12:19:04 +0000.