GHSA-9ghp-w2hm-vfpf: Wasmtime jit debug Wasmtime_jit_debug Dumps Undefined Memory By Vulnerability

MODERATE
CWE-119
Published
Advisory Summary

GHSA-9ghp-w2hm-vfpf is a MODERATE wasmtime_jit_debug dumps undefined memory by vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Wasmtime jit debug libraries in the crates.io ecosystem. The issue involves wasmtime_jit_debug dumps undefined memory by `jitdumpfile`. Remediation is available by upgrading affected packages to version 24.0.0.

GHSA-9ghp-w2hm-vfpf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9ghp-w2hm-vfpf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Wasmtime jit debug
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-9ghp-w2hm-vfpf

To remediate this vulnerability, upgrade all affected Wasmtime jit debug dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wasmtime-jit-debug fixed: 24.0.0
Upgrade wasmtime-jit-debug to 24.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wasmtime-jit-debug

How to Check if You Are Affected

To determine whether your application is affected by GHSA-9ghp-w2hm-vfpf, inspect your project dependencies for Wasmtime jit debug:

inspect dependencies for wasmtime-jit-debug

Analyze the terminal output to locate any version of Wasmtime jit debug in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 24.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Wasmtime jit debug, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The unsound function `dump_code_load_record` uses `from_raw_parts` to directly convert the pointer `addr` and `len` into a slice without any validation and that memory block would be dumped. Thus, the 'safe' function dump_code_load_record is actually 'unsafe' since it requires the caller to guarantee that the addr is valid and len must not overflow. Otherwise, the function could dump the memory into file illegally, causing memory leak. > **Note**: this is an internal-only crate in the Wasmtime project not intended for external use and is more strongly signaled nowadays as of [bytecodealliance/wasmtime#10963](https://github.com/bytecodealliance/wasmtime/pull/10963). Please open an issue in Wasmtime if you're using this crate directly.

GHSA-9ghp-w2hm-vfpf Affected Wasmtime jit debug Versions

1 component(s)
Fixed Versions:
24.0.0
Product / Package Ecosystem Affected Versions Fixed Version
wasmtime-jit-debug
crates.io
< 24.0.0
24.0.0

References

Frequently Asked Questions

What is GHSA-9ghp-w2hm-vfpf?
GHSA-9ghp-w2hm-vfpf is a security vulnerability in Wasmtime jit debug involving wasmtime_jit_debug Dumps Undefined Memory by `JitDumpFile` under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Wasmtime jit debug versions are affected?
Affected versions include releases prior to 24.0.0 across affected packages: wasmtime-jit-debug.
What version fixes GHSA-9ghp-w2hm-vfpf?
Upgrading to 24.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wasmtime-jit-debug affected?
Yes, wasmtime-jit-debug is affected in releases prior to 24.0.0. Upgrade your dependency to 24.0.0 or later.
What CWE is associated with GHSA-9ghp-w2hm-vfpf?
GHSA-9ghp-w2hm-vfpf is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check crates.io dependencies for GHSA-9ghp-w2hm-vfpf?
Run the dependency tree command: 'inspect dependencies for wasmtime-jit-debug'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9ghp-w2hm-vfpf",
  "modified" : "2025-06-17T15:37:57Z",
  "published" : "2025-06-17T15:37:56Z",
  "aliases" : [ ],
  "summary" : "wasmtime_jit_debug Dumps Undefined Memory by `JitDumpFile`",
  "details" : "The unsound function `dump_code_load_record` uses `from_raw_parts` to directly convert the pointer `addr` and `len` into a slice without any validation and that memory block would be dumped.\n\nThus, the 'safe' function dump_code_load_record is actually 'unsafe' since it requires the caller to guarantee that the addr is valid and len must not overflow. Otherwise, the function could dump the memory into file illegally, causing memory leak.\n\n> **Note**: this is an internal-only crate in the Wasmtime project not intended for external use and is more strongly signaled nowadays as of [bytecodealliance/wasmtime#10963](https://github.com/bytecodealliance/wasmtime/pull/10963). Please open an issue in Wasmtime if you're using this crate directly.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "wasmtime-jit-debug"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "24.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/issues/8905"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bytecodealliance/wasmtime/commit/b5e31a5c33725ab8a7dfbe8505c56b5cf282ffed"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bytecodealliance/wasmtime"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0442.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-17T15:37:56Z",
    "nvd_published_at" : null
  }
}