{"id":"CVE-2022-39394","revision":"886bd05c82f34eefb5e1ac16dd2102e2","records":[{"revision":"886bd05c82f34eefb5e1ac16dd2102e2","observedAt":"2026-10-24T21:17:10.699+00:00","statement":{"source":"nvd","id":"CVE-2022-39394","aliases":[],"title":"Wasmtime is a standalone runtime for WebAssembly. Prior to version 2.0.2, there is a bug in Wasmtime's C API implementation where the definition of the `wasmtime_trap_code` does not match its declared signature in the `wasmtime/trap.h` head…","description":"Wasmtime is a standalone runtime for WebAssembly. Prior to version 2.0.2, there is a bug in Wasmtime's C API implementation where the definition of the `wasmtime_trap_code` does not match its declared signature in the `wasmtime/trap.h` header file. This discrepancy causes the function implementation to perform a 4-byte write into a 1-byte buffer provided by the caller. This can lead to three zero bytes being written beyond the 1-byte location provided by the caller. This bug has been patched and users should upgrade to Wasmtime 2.0.2. This bug can be worked around by providing a 4-byte buffer casted to a 1-byte buffer when calling `wasmtime_trap_code`. Users of the `wasmtime` crate are not affected by this issue, only users of the C API function `wasmtime_trap_code` are affected.","state":0,"publishedAt":"2022-11-10T20:15:11.85+00:00","modifiedAt":"2026-06-17T04:58:16.46+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.8,"severity":"LOW"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/bytecodealliance/wasmtime/commit/087d9d7becf7422b3f872a3bcd5d97bb7ce7ff36","https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-h84q-m8rr-3v9q"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2022-39394","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-787"],"productCriteria":["cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*"],"sourceDates":{"published":"2022-11-10T20:15:11.850","lastModified":"2026-06-17T04:58:16.460"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2022-39394","identifiers":["CVE-2022-39394"]},"retained":false,"historicalAffected":[]}],"coverage":[]}