← Übersicht Nicht im beobachteten Stack

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

CVE-2024-24576 · openSUSE-SU-2024:13966-1

Kritisch · CVSS 10.0 SUSE: criticalSUSE: moderateRed Hat: Low Netzwerk · ohne Login Kein Fix bekannt

Veröffentlicht
09.04.2024 19:00
Zuletzt geändert
04.02.2026
EPSS (30 Tage)
20.3 %
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Beschreibung

Originaltext der Quelle, nicht übersetzt.

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.

Status beim Hersteller

SUSE stuft seine Produktlinien ein: 1 behoben, 25 nicht betroffen.

openSUSE Tumbleweed Behoben cargo1.77-1.77.2-1.1, rust1.77-1.77.2-1.1
openSUSE Tumbleweed Behoben rust1.77-1.77.2-1.1
Nicht betroffen (25)
Red Hat Enterprise Linux 8Nicht betroffenverwundbarer Code nicht enthaltencargo, cargo-doc, clippy, rls, rust, rust-analysis, rust-analyzer, rust-debugger-common, rust-doc, rust-gdb, rust-lldb, rust-src, rust-std-static, rust-std-static-wasm32-unknown-unknown, rust-std-static-wasm32-wasi, rust-toolset, rustfmt
Red Hat Enterprise Linux 9Nicht betroffenverwundbarer Code nicht enthaltencargo, clippy, rust, rust-analysis, rust-analyzer, rust-debugger-common, rust-doc, rust-gdb, rust-lldb, rust-src, rust-std-static, rust-std-static-wasm32-unknown-unknown, rust-std-static-wasm32-wasi, rust-std-static-wasm32-wasip1, rust-toolset, rustfmt
SUSE Enterprise Storage 7.1Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.53, cargo1.53-doc, cargo1.54, cargo1.54-doc, cargo1.55, cargo1.56, cargo1.57, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, rls, rls1.43, rls1.53, rls1.54, rust, rust-gdb, rust1.43 und 25 weitere
SUSE Linux Enterprise Desktop 15 SP5Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, cargo1.75, cargo1.76, cargo1.77, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc, rust1.43-gdb, rust1.43-src, rust1.68, rust1.69, rust1.70, rust1.71, rust1.72 und 5 weitere
SUSE Linux Enterprise High Performance Computing 15 SP2-LTSSNicht betroffencargo, clippy, rls, rust, rust-analysis, rust-src, rust-std-static, rustfmt
SUSE Linux Enterprise High Performance Computing 15 SP3-LTSSNicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.53, cargo1.53-doc, cargo1.54, cargo1.54-doc, cargo1.55, cargo1.56, cargo1.57, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, rls, rls1.43, rls1.53, rls1.54, rust, rust-gdb, rust1.43 und 25 weitere
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOSNicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, cargo1.66, cargo1.67, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc und 19 weitere
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSSNicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, cargo1.66, cargo1.67, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc und 19 weitere
SUSE Linux Enterprise High Performance Computing 15 SP5Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, cargo1.75, cargo1.76, cargo1.77, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc, rust1.43-gdb, rust1.43-src, rust1.68, rust1.69, rust1.70, rust1.71, rust1.72 und 5 weitere
SUSE Linux Enterprise Module for Development Tools 15 SP5Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, cargo1.75, cargo1.76, cargo1.77, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc, rust1.43-gdb, rust1.43-src, rust1.68, rust1.69, rust1.70, rust1.71, rust1.72 und 5 weitere
SUSE Linux Enterprise Server 15Nicht betroffencargo, clippy, rls, rust, rust-analysis, rust-gdb, rust-src, rust-std, rust-std-static, rustfmt
SUSE Linux Enterprise Server 15 SP1Nicht betroffencargo, clippy, rls, rust, rust-analysis, rust-src, rust-std-static, rustfmt
SUSE Linux Enterprise Server 15 SP1-LTSSNicht betroffencargo, clippy, rls, rust, rust-analysis, rust-src, rust-std-static, rustfmt
SUSE Linux Enterprise Server 15 SP2Nicht betroffencargo, clippy, rls, rust, rust-analysis, rust-src, rust-std-static, rustfmt
SUSE Linux Enterprise Server 15 SP2-LTSSNicht betroffencargo, clippy, rls, rust, rust-analysis, rust-src, rust-std-static, rustfmt
SUSE Linux Enterprise Server 15 SP3Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.53, cargo1.53-doc, cargo1.54, cargo1.54-doc, cargo1.55, cargo1.56, cargo1.57, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, rls, rls1.43, rls1.53, rls1.54, rust, rust-gdb, rust1.43 und 25 weitere
SUSE Linux Enterprise Server 15 SP3-LTSSNicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.53, cargo1.53-doc, cargo1.54, cargo1.54-doc, cargo1.55, cargo1.56, cargo1.57, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, rls, rls1.43, rls1.53, rls1.54, rust, rust-gdb, rust1.43 und 25 weitere
SUSE Linux Enterprise Server 15 SP4Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, cargo1.66, cargo1.67, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, rls1.43, rust, rust-analysis, rust1.43, rust1.43-analysis und 20 weitere
SUSE Linux Enterprise Server 15 SP4-LTSSNicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, cargo1.66, cargo1.67, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, rls1.43, rust, rust-analysis, rust1.43, rust1.43-analysis und 20 weitere
SUSE Linux Enterprise Server 15 SP5Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, cargo1.75, cargo1.76, cargo1.77, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc, rust1.43-gdb, rust1.43-src, rust1.68, rust1.69, rust1.70, rust1.71, rust1.72 und 5 weitere
SUSE Linux Enterprise Server 15-LTSSNicht betroffencargo, clippy, rls, rust, rust-analysis, rust-gdb, rust-src, rust-std, rust-std-static, rustfmt
SUSE Linux Enterprise Server for SAP Applications 15 SP2Nicht betroffencargo, clippy, rls, rust, rust-analysis, rust-src, rust-std-static, rustfmt
SUSE Linux Enterprise Server for SAP Applications 15 SP3Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.53, cargo1.53-doc, cargo1.54, cargo1.54-doc, cargo1.55, cargo1.56, cargo1.57, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, rls, rls1.43, rls1.53, rls1.54, rust, rust-gdb, rust1.43 und 25 weitere
SUSE Linux Enterprise Server for SAP Applications 15 SP4Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.58, cargo1.59, cargo1.60, cargo1.61, cargo1.62, cargo1.63, cargo1.64, cargo1.65, cargo1.66, cargo1.67, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, rls1.43, rust, rust-analysis, rust1.43, rust1.43-analysis und 20 weitere
SUSE Linux Enterprise Server for SAP Applications 15 SP5Nicht betroffencargo, cargo1.43, cargo1.43-doc, cargo1.68, cargo1.69, cargo1.70, cargo1.71, cargo1.72, cargo1.73, cargo1.74, cargo1.75, cargo1.76, cargo1.77, rls1.43, rust, rust1.43, rust1.43-analysis, rust1.43-doc, rust1.43-gdb, rust1.43-src, rust1.68, rust1.69, rust1.70, rust1.71, rust1.72 und 5 weitere
Weitere betroffene Pakete (4)
CVErust-lang/rustkein Fix bekanntCVE-2024-24576
NVDfedoraproject:fedorakein Fix bekanntCVE-2024-24576
NVDrust-lang:rust1.77.2CVE-2024-24576
openSUSE:Tumbleweedrust1.771.77.2-1.1openSUSE-SU-2024:13966-1

Empfohlene Prüfung

  1. Feststellen, ob und in welcher Version die betroffenen Pakete in Ihren Systemen, Images und Abhängigkeiten vorkommen.
  2. Wo eine Fix-Version genannt ist: aktualisieren. Wo nicht: Hersteller-Advisory und Referenzen auf Workarounds prüfen.
  3. Erreichbarkeit beachten: Der Angriffsweg (Netzwerk · ohne Login) ist aus dem CVSS-Vektor abgeleitet.

Diese Seite sagt nichts darüber, ob Ihre Systeme betroffen sind. Das klärt erst eine Prüfung Ihrer Versionen.