{"answers":{"affected":"7 open source packages ship an affected version, including cap-std, cap-async-std and cap-primitives.","exploited":"There is no known exploitation of CVE-2024-51756 in the wild and no public exploit code.","fix":"Upgrade cap-std to 3.4.1 or later.","what":"CVE-2024-51756 is a low-severity path traversal vulnerability in bytecodealliance cap-std, published on 5 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-51756 and fix it if it is affected.\n\nWhat it is: CVE-2024-51756 is a low-severity path traversal vulnerability in bytecodealliance cap-std, published on 5 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-51756 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- cap-std (crates.io): affected all versions; fixed in 3.4.1\n- cap-std (crates.io): affected all versions; fixed in 3.4.1\n- cap-async-std (crates.io): affected all versions; fixed in 3.4.1\n- cap-async-std (crates.io): affected all versions; fixed in 3.4.1\n- cap-primitives (crates.io): affected all versions; fixed in 3.4.1\n- cap-primitives (crates.io): affected all versions; fixed in 3.4.1\n- cap-primitives (crates.io): affected from 0.0.0-0; fixed in 3.4.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-51756/ (Markdown: https://insights.sbomify.com/CVE-2024-51756/index.md)","id":"CVE-2024-51756","markdown":"https://insights.sbomify.com/CVE-2024-51756/index.md","name":"CVE-2024-51756","record":{"aliases":["GHSA-hxf5-99xg-86hw","RUSTSEC-2024-0445"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust capability library","requires_auth":"low_privilege","summary":"Attackers can bypass filesystem sandboxing on Windows using special device filenames with superscript digits to access peripheral devices or network resources.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":2.3,"severity":"low","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"The cap-std project is organized around the eponymous `cap-std` crate, and develops libraries to make it easy to write capability-based code. 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. The bug is fixed in #371, which is published in cap-primitives 3.4.1, cap-std 3.4.1, and cap-async-std 3.4.1. There are no known workarounds for this issue. Affected Windows users are recommended to upgrade.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"cap-std doesn't fully sandbox all the Windows device filenames","id":"CVE-2024-51756","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":7,"n_references":5,"next":{"headline":"Fixes security vulnerability that allowed for server side code to be executed by a \u003cscript\u003e tag","id":"CVE-2024-51757"},"packages":[{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0"],"last_affected":[],"package":"cap-async-std","purl":null,"source":"GHSA-hxf5-99xg-86hw"},{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0"],"last_affected":[],"package":"cap-async-std","purl":"pkg:cargo/cap-async-std","source":"GHSA-hxf5-99xg-86hw"},{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0"],"last_affected":[],"package":"cap-primitives","purl":null,"source":"GHSA-hxf5-99xg-86hw"},{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0"],"last_affected":[],"package":"cap-primitives","purl":"pkg:cargo/cap-primitives","source":"GHSA-hxf5-99xg-86hw"},{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0.0.0-0"],"last_affected":[],"package":"cap-primitives","purl":"pkg:cargo/cap-primitives","source":"RUSTSEC-2024-0445"},{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0"],"last_affected":[],"package":"cap-std","purl":null,"source":"GHSA-hxf5-99xg-86hw"},{"ecosystem":"crates.io","fixed":["3.4.1"],"introduced":["0"],"last_affected":[],"package":"cap-std","purl":"pkg:cargo/cap-std","source":"GHSA-hxf5-99xg-86hw"}],"prev":{"headline":"Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig","id":"CVE-2024-51755"},"products":["cap-std"],"published":"2024-11-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-11-06","vendors":["bytecodealliance"]},"summary":"Attackers can bypass filesystem sandboxing on Windows using special device filenames with superscript digits to access peripheral devices or network resources.","url":"https://insights.sbomify.com/CVE-2024-51756/"}