CVE-2024-24576 in Fedoraproject Fedora and 2 more products
Rust is a programming language. The Rust Security Response WG was notified that the Rust standard library prior to version 1.77.2 did not properly escape arguments when invoking batch files (with the `bat` and `cmd` extensions) on Windows using the `Command`. An attacker able to control the arguments passed to the s...
Affects 3 products from 3 vendors. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, can impact systems beyond the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Fedoraproject | Fedora | 38 39 40 |
| Rust-Lang | Rust | < 1.77.2 |
Platforms listed by the source (the vulnerable product runs on these; they are not themselves vulnerable): Microsoft Windows
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
Rust is a programming language. The Rust Security Response WG was notified that the Rust standard library prior to version 1.77.2 did not properly escape arguments when invoking batch files (with the `bat` and `cmd` extensions) on Windows using the `Command`. An attacker able to control the arguments passed to the spawned process could execute arbitrary shell commands by bypassing the escaping. The severity of this vulnerability is critical for those who invoke batch files on Windows with untrusted arguments. No other platform or use is affected. The `Command::arg` and `Command::args` APIs state in their documentation that the arguments will be passed to the spawned process as-is, regardless of the content of the arguments, and will not be evaluated by a shell. This means it should be safe to pass untrusted input as an argument. On Windows, the implementation of this is more complex than other platforms, because the Windows API only provides a single string containing all the arguments to the spawned process, and it's up to the spawned process to split them. Most programs use the standard C run-time argv, which in practice results in a mostly consistent way arguments are splitted. One exception though is `cmd.exe` (used among other things to execute batch files), which has its own argument splitting logic. That forces the standard library to implement custom escaping for arguments passed to batch files. Unfortunately it was reported that our escaping logic was not thorough enough, and it was possible to pass malicious arguments that would result in arbitrary shell execution. Due to the complexity of `cmd.exe`, we didn't identify a solution that would correctly escape arguments in all cases. To maintain our API guarantees, we improved the robustness of the escaping code, and changed the `Command` API to return an `InvalidInput` error when it cannot safely escape an argument. This error will be emitted when spawning the process. The fix is included in Rust 1.77.2. Note that the new escaping logic for batch files errs on the conservative side, and could reject valid arguments. Those who implement the escaping themselves or only handle trusted inputs on Windows can also use the `CommandExt::raw_arg` method to bypass the standard library's escaping logic.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-24576 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-050498-C |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| Published | 2024-04-09 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-78: OS Command Injection
Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.
CWE-88: CWE-88
Related attack patterns (CAPEC)
CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads via CWE-88
CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-78
CAPEC-108 Command Line Execution through SQL Injection via CWE-78
CAPEC-174 Flash Parameter Injection via CWE-88
CAPEC-460 HTTP Parameter Pollution (HPP) via CWE-88
Show all 9
CAPEC-6 Argument Injection via CWE-78
CAPEC-15 Command Delimiters via CWE-78
CAPEC-88 OS Command Injection via CWE-78, CWE-88
CAPEC-137 Parameter Injection via CWE-88
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A critical vulnerability in the Rust standard library prior to version 1.77.2 allows attackers to execute arbitrary shell commands on Windows systems by bypassing argument escaping when invoking batch files.
The vulnerability arises from the improper escaping of arguments when the `Command` API in the Rust standard library is used to invoke batch files (`.bat` and `.cmd`) on Windows. An attacker who can control the arguments passed to the spawned process can inject malicious commands, leading to arbitrary code execution.
Questions
What is CVE-2024-24576?
A critical vulnerability in the Rust standard library prior to version 1.77.2 allows attackers to execute arbitrary shell commands on Windows systems by bypassing argument escaping when invoking batch files.
What is the CVSS score for CVE-2024-24576?
CVE-2024-24576 has CVSS 10.0 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H. EPSS: 19.1%.
Is CVE-2024-24576 actively exploited?
No confirmed active exploitation of CVE-2024-24576 as of 2026-09-25.
How do I remediate CVE-2024-24576?
Priority: IMMEDIATE. Advisory: https://lists.fedoraproject.org/archives/list/[email protected]/message/N323QAEEUVTJ354BTVQ7UB6LYXUX2BCL/ PSIRT: [email protected]
What systems are affected by CVE-2024-24576?
CVE-2024-24576 affects Fedoraproject Fedora; Rust-Lang Rust.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Fedoraproject","product":"Fedora","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.