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

CVE-2024-51745: Wasmtime doesn't fully sandbox all the Windows device filenames

November 5, 2024 (updated May 2, 2025)

Wasmtime’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.

References

  • en.wikipedia.org/wiki/ISO/IEC_8859-1
  • github.com/advisories/GHSA-c2f5-jxjv-2hh8
  • github.com/bytecodealliance/cap-std/pull/371
  • github.com/bytecodealliance/wasmtime
  • github.com/bytecodealliance/wasmtime/security/advisories/GHSA-c2f5-jxjv-2hh8
  • learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
  • nvd.nist.gov/vuln/detail/CVE-2024-51745
  • rustsec.org/advisories/RUSTSEC-2024-0438.html

Code Behaviors & Features

Detect and mitigate CVE-2024-51745 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 24.0.2, all versions starting from 25.0.0 before 25.0.3, all versions starting from 26.0.0 before 26.0.1, version 26.0.0

Fixed versions

  • 24.0.2
  • 25.0.3
  • 26.0.1

Solution

Upgrade to versions 24.0.2, 25.0.3, 26.0.1 or above.

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs
  • CWE-67: Improper Handling of Windows Device Names

Source file

cargo/wasmtime/CVE-2024-51745.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:06 +0000.