Summary
cap-std doesn't fully sandbox all the Windows device filenames
Workarounds
There are no known workarounds for this issue. Affected Windows users are recommended to upgrade.
References
- Microsoft's documentation of the special device filenames
- ISO-8859-1
- https://github.com/bytecodealliance/cap-std/pull/371
Impact
cap-std'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 filesystem paths could bypass the sandbox and access devices through those special device filenames with superscript digits, and through them provide 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.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The bug is fixed in https://github.com/bytecodealliance/cap-std/pull/371, which is published in cap-primitives 3.4.1, cap-std 3.4.1, and cap-async-std 3.4.1.
Frequently Asked Questions
- What is CVE-2024-51756? CVE-2024-51756 is a low-severity path traversal vulnerability in cap-std (rust), affecting versions < 3.4.1. It is fixed in 3.4.1. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- Which packages are affected by CVE-2024-51756?
cap-std(rust) (versions < 3.4.1)cap-async-std(rust) (versions < 3.4.1)cap-primitives(rust) (versions < 3.4.1)
- Is there a fix for CVE-2024-51756? Yes. CVE-2024-51756 is fixed in 3.4.1. Upgrade to this version or later.
- Is CVE-2024-51756 exploitable, and should I be worried? Whether CVE-2024-51756 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-51756 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-51756?
- Upgrade
cap-stdto 3.4.1 or later - Upgrade
cap-async-stdto 3.4.1 or later - Upgrade
cap-primitivesto 3.4.1 or later
- Upgrade