CVE-2024-24576CWE-78CWE-88

Rusts's `std::process::Command` did not properly escape arguments of batch files on Windows

Critical · published April 9, 2024

CVSS v3.1
10.0
EPSS
20%
Percentile
97.5
In the wild
Unconfirmed
What it is

🚨 A crafty attacker can slip malicious commands through the cracks of Rust's standard library on Windows! 🔥 Think of it like a restaurant kitchen where the head chef trusts their assistants with ingredients but neglects to check for hidden allergens. If unchecked, an untrustworthy ingredient could spoil the whole dish—just like these unescaped arguments can ruin your system. An attacker could exploit this vulnerability to run arbitrary commands on your system, leading to a complete takeover. This is absolutely devastating, especially if your application is handling untrusted input in batch files! Your critical data could be compromised or wiped out in seconds if this issue is left unaddressed.

Put simply

Think of it like a restaurant kitchen where the head chef trusts their assistants with ingredients but neglects to check for hidden allergens. If unchecked, an untrustworthy ingredient could spoil the whole dish—just like these unescaped arguments can ruin your system. The vulnerability arises from insufficient escaping of arguments when invoking batch files on Windows, allowing attackers to bypass intended restrictions and execute arbitrary shell commands. This is particularly dangerous as it affects instances where untrusted input is utilized in the `Command` API prior to Rust version 1.77.2.

What to do

An attacker could exploit this vulnerability to run arbitrary commands on your system, leading to a complete takeover. This is absolutely devastating, especially if your application is handling untrusted input in batch files! Your critical data could be compromised or wiped out in seconds if this issue is left unaddressed. Upgrade your Rust installation to version 1.77.2 or later immediately to benefit from the improved escaping logic. If you're dealing with untrusted input, consider using the updated `Command` API which now returns an `InvalidInput` error for unsafe arguments – better safe than sorry! You've got this! Take action now, and you'll have your Rust environment secured in no time! 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.20342 · 97.5th percentile
Weaknesses
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'); CWE-88 · Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Published
2024-04-09T17:28Z
EPSS history
Timeline
  • 09 APR 17:28Z
    Rusts's `std::process::Command` did not properly escape arguments of batch files on Windows
    cvelistv5