Rust bis 1.77.1 auf Windows Batch File Command::arg erweiterte Rechte
| CVSS Meta Temp Score | Aktueller Exploitpreis (≈) | CTI Interest Score |
|---|---|---|
| 9.0 | $0-$5k | 0.00 |
Zusammenfassung
Eine kritische Schwachstelle wurde in Rust bis 1.77.1 für Windows entdeckt. Hierbei betrifft es die Funktion Command::arg der Komponente Batch File Handler. Durch Manipulieren mit unbekannten Daten kann eine erweiterte Rechte-Schwachstelle ausgenutzt werden.
Diese Schwachstelle wird als CVE-2024-24576 gehandelt. Der Angriff lässt sich über das Netzwerk starten. Es ist kein Exploit verfügbar.
Es wird empfohlen, die betroffene Komponente zu aktualisieren.
Details
Es wurde eine kritische Schwachstelle in Rust bis 1.77.1 auf Windows gefunden. Es betrifft die Funktion Command::arg der Komponente Batch File Handler. Dank Manipulation mit einer unbekannten Eingabe kann eine erweiterte Rechte-Schwachstelle ausgenutzt werden. Im Rahmen von CWE wurde eine Klassifizierung als CWE-78 vorgenommen. Auswirkungen hat dies auf Vertraulichkeit, Integrität und Verfügbarkeit. Die Zusammenfassung von CVE lautet:
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.Bereitgestellt wird das Advisory unter github.com. Die Identifikation der Schwachstelle wird seit dem 25.01.2024 mit CVE-2024-24576 vorgenommen. Sie gilt als leicht auszunutzen. Der Angriff kann über das Netzwerk erfolgen. Zur Ausnutzung ist keine spezifische Authentisierung erforderlich. Es sind zwar technische Details, jedoch kein verfügbarer Exploit zur Schwachstelle bekannt. Als Angriffstechnik weist das MITRE ATT&CK Projekt die ID T1202 aus.
Für den Vulnerability Scanner Nessus wurde ein Plugin mit der ID 211028 (Fedora 41 : rust (2024-3534c44ef9)) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann.
Ein Aktualisieren auf die Version 1.77.2 vermag dieses Problem zu lösen.
Unter anderem wird der Fehler auch in der Verwundbarkeitsdatenbank von Tenable (211028) dokumentiert. If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Produkt
Name
Version
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Zuverlässigkeit: 🔍
CVSSv3
VulDB Meta Base Score: 9.1VulDB Meta Temp Score: 9.0
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍
NVD Base Score: 10.0
NVD Vector: 🔍
CNA Base Score: 10.0
CNA Vector (GitHub, Inc.): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vektor | Komplexität | Authentisierung | Vertraulichkeit | Integrität | Verfügbarkeit |
|---|---|---|---|---|---|
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Zuverlässigkeit: 🔍
Exploiting
Klasse: Erweiterte RechteCWE: CWE-78 / CWE-77 / CWE-74
CAPEC: 🔍
ATT&CK: 🔍
Physisch: Nein
Lokal: Nein
Remote: Ja
Verfügbarkeit: 🔍
Status: Nicht definiert
EPSS Score: 🔍
EPSS Percentile: 🔍
Preisentwicklung: 🔍
Aktuelle Preisschätzung: 🔍
| 0-Day | freischalten | freischalten | freischalten | freischalten |
|---|---|---|---|---|
| Heute | freischalten | freischalten | freischalten | freischalten |
Nessus ID: 211028
Nessus Name: Fedora 41 : rust (2024-3534c44ef9)
Threat Intelligence
Interesse: 🔍Aktive Akteure: 🔍
Aktive APT Gruppen: 🔍
Gegenmassnahmen
Empfehlung: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Rust 1.77.2
Timeline
25.01.2024 🔍09.04.2024 🔍
09.04.2024 🔍
16.04.2026 🔍
Quellen
Advisory: GHSA-q455-m56c-85mhStatus: Bestätigt
CVE: CVE-2024-24576 (🔍)
GCVE (CVE): GCVE-0-2024-24576
GCVE (VulDB): GCVE-100-260085
Eintrag
Erstellt: 09.04.2024 20:53Aktualisierung: 16.04.2026 20:40
Anpassungen: 09.04.2024 20:53 (66), 17.11.2024 21:09 (3), 05.01.2026 19:56 (12), 16.04.2026 20:40 (18)
Komplett: 🔍
Cache ID: 216::103
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Bisher keine Kommentare. Sprachen: de + en.
Bitte loggen Sie sich ein, um kommentieren zu können.