CVE-2024-51745: Wasmtime Wasmtime Doesn't Fully Sandbox All Vulnerability
LOWCVE-2024-51745 is a LOW wasmtime doesn't fully sandbox all vulnerability (CWE-67: Improper Handling of Windows Device Names) affecting Wasmtime libraries in the crates.io ecosystem. The issue involves wasmtime doesn't fully sandbox all the windows device filenames. Remediation is available by upgrading affected packages to version 24.0.2, 25.0.3, 26.0.1.
CVE-2024-51745 at a Glance
How to Fix CVE-2024-51745
To remediate this vulnerability, upgrade all affected Wasmtime dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade wasmtime to 24.0.2
Upgrade wasmtime to 25.0.3
Upgrade wasmtime to 26.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for wasmtime
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-51745, inspect your project dependencies for Wasmtime:
inspect dependencies for wasmtime
Analyze the terminal output to locate any version of Wasmtime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 24.0.2), 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-67: Improper Handling of Windows Device Names, where the product constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a windows device name such as aux or con. this typically leads to denial of service or an information exposure when the application attempts to process the pathname as a regular file. In Wasmtime, 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
CVE-2024-51745 Affected Wasmtime Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wasmtime
|
crates.io |
< 24.0.2
|
24.0.2
|
|
wasmtime
|
crates.io |
≥ 25.0.0
< 25.0.3
|
25.0.3
|
|
wasmtime
|
crates.io |
≥ 26.0.0
< 26.0.1
All 1 versions
26.0.0
|
26.0.1
|
References
Frequently Asked Questions
What is CVE-2024-51745?
Which Wasmtime versions are affected?
What version fixes CVE-2024-51745?
Is wasmtime affected?
What CWE is associated with CVE-2024-51745?
How can I check crates.io dependencies for CVE-2024-51745?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c2f5-jxjv-2hh8",
"modified" : "2025-05-02T12:53:57Z",
"published" : "2024-11-05T22:18:49Z",
"aliases" : [ "CVE-2024-51745" ],
"summary" : "Wasmtime doesn't fully sandbox all the Windows device filenames",
"details" : "### Impact\n\nWasmtime's filesystem sandbox implementation on Windows blocks access to special device filenames such as \"COM1\", \"COM2\", \"LPT0\", \"LPT1\", and so on, however it did not block access to the special device filenames which use superscript digits, such as \"COM¹\", \"COM²\", \"LPT⁰\", \"LPT¹\", and so on. Untrusted Wasm programs that are given access to any filesystem directory could bypass the sandbox and access devices through those special device filenames with superscript digits, and through them gain access peripheral devices connected to the computer, or network resources mapped to those devices. This can include modems, printers, network printers, and any other device connected to a serial or parallel port, including emulated USB serial ports.\n\n### Patches\n\nPatch releases for Wasmtime have been issued as 24.0.2, 25.0.3, and 26.0.1. Users of Wasmtime 23.0.x and prior are recommended to upgrade to one of these patched versions.\n\n### Workarounds\n\nThere are no known workarounds for this issue. Affected Windows users are recommended to upgrade.\n\n### References\n\n - [Microsoft's documentation](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions) of the special device filenames\n - [ISO-8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)\n - [The original PR reporting the issue](https://github.com/bytecodealliance/cap-std/pull/371)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "24.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "25.0.0"
}, {
"fixed" : "25.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "26.0.0"
}, {
"fixed" : "26.0.1"
} ]
} ],
"versions" : [ "26.0.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-c2f5-jxjv-2hh8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51745"
}, {
"type" : "WEB",
"url" : "https://github.com/bytecodealliance/cap-std/pull/371"
}, {
"type" : "WEB",
"url" : "https://en.wikipedia.org/wiki/ISO/IEC_8859-1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bytecodealliance/wasmtime"
}, {
"type" : "WEB",
"url" : "https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0438.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184", "CWE-67" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-05T22:18:49Z",
"nvd_published_at" : "2024-11-05T22:15:21Z"
}
}