Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-24576

published critical CVSS 3.1 · 10.0

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

Published
09 Apr 2024, 17:28:41 UTC
Updated
04 Nov 2025, 18:29:08 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
rust-lang — rust< 1.77.2 Affected Not stated GitHub_M
rust-lang — rust0 to < 1.77.2 · Other versions: affected Affected Not stated CISA-ADP
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
SUSE / openSUSE openSUSE-Tumbleweed cargo1.77aarch64 Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.77ppc64le Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.77s390x Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
SUSE / openSUSE openSUSE-Tumbleweed cargo1.77x86_64 Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
Show 4 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
SUSE / openSUSE openSUSE-Tumbleweed rust1.77aarch64 Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.77ppc64le Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.77s390x Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1
SUSE / openSUSE openSUSE-Tumbleweed rust1.77x86_64 Advisory build 1.77.2-1.1 OPENSUSE-SU-2024:13966-1

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

1

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
10.0 / 10
Severity
critical
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
rust-lang rust < 1.77.2 (affected) GitHub_M · cna
rust-lang rust 0 to < 1.77.2 (affected · semver)Default: affected CISA-ADP · adp

Weaknesses

2
  • CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (GitHub_M · cna)
  • CWE-88 CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (GitHub_M · cna)

References

13

Provider assertions

3

GitHub_M · cna

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

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
a24d70ef021c77f55c0a8b0eba17a66e8c0d855bd69f834b595cd5e835e9e90c
Ingested
23 Sep 2026, 08:19:54 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected