CVE-2024-24576General(fedoraproject / fedora)

LOWCVSS 10.0 · CRITICAL

Signal is active with 1 mentions in latest observed window

Immediate actions

  • Track advisory updates for patch or workaround availability

Recommended action window: Monitor and triage in normal cycle

NVD 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.

0.5/ 10 priority

Sources & remediation

Weakness type (CWE)
CWE-78CWE-88

Priority

LOW

Exploitation

NONE

PoC

NONE

Patch

NONE

Momentum

NONE

Are you affected?

If you run products in this scope, you should treat this CVE as relevant to your environment.

  • fedora
  • rust
  • windows

Threat summary

  • 1 mentions across 1 observed day

What's happening

  • Technical details provided in 1 signal
  • General: 1 classified signal
  • 1 total mentions across 1 day

Affected systems

Products
fedorarustwindows

4 versions affected across 3 products

Deep dive

Activity timeline1 mentions / 1d
00111Mentions · 2026-01-31: 1Technical Details · 2026-01-31: 101-31
Signal classification1 categories
General
1100.0%
Referenced assets1 URL
Full discourse1 post
  • HackerNoon | Learn Any Technology@hackernoon
    General

    The severity of this vulnerability was critical if you were invoking batch files on Windows with untrusted arguments. - https://hackernoon.com/rust-cve-2024-24576-explained-what-was-this-security-advisory #rust #rustlang

    Post summary

    The text highlights CVE‑2024‑24576 as a critical issue when Windows batch files are invoked with untrusted arguments, but provides no proof‑of‑concept, exploit code, patch information, or evidence of active exploitation.

    00000325
    89.6K followersView on X
CPE platform detail5 entries

5 of 5 entries

PartVendorProductVersionTarget SWTarget HW
OSfedoraprojectfedora38--
OSfedoraprojectfedora39--
OSfedoraprojectfedora40--
OSmicrosoftwindows---
Apprust-langrust---

Explore more