Loading HuntDB...

`std::process::Command` batch files argument escaping could be bypassed with trailing whitespace or periods

Low
I
Internet Bug Bounty
Submitted None

Team Summary

Official summary from Internet Bug Bounty

Full GHSA: https://github.com/rust-lang/rust/security/advisories/GHSA-2xg3-7mm6-98jj

Reported by 4xpl0r3r

Vulnerability Details

Technical details and impact analysis

On April 9th, 2024, the Rust Security Response WG disclosed CVE-2024-24576, where std::process::Command incorrectly escaped arguments when invoking batch files on Windows. We were notified that our fix for the vulnerability was incomplete, and it was possible to bypass the fix when the batch file name had trailing whitespace or periods (which are ignored and stripped by Windows). The severity of the incomplete fix is low, due to the niche conditions needed to trigger it. Note that calculating the CVSS score might assign a higher severity to this, but that doesn't take into account what is required to trigger the incomplete fix. The incomplete fix is identified by CVE-2024-43402. ## Impact All Rust versions before 1.81.0 are affected, if your code or one of your dependencies invoke a batch script on Windows with trailing whitespace or trailing periods in the name, and pass untrusted arguments to it.

Related CVEs

Associated Common Vulnerabilities and Exposures

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 …

Rust is a programming language. The fix for CVE-2024-24576, where `std::process::Command` incorrectly escaped arguments when invoking batch files on Windows, was incomplete. Prior to Rust version 1.81.0, it was possible to bypass the fix when the batch file name had trailing whitespace or periods (which are ignored and stripped by …

Report Details

Additional information and metadata

State

Closed

Substate

Resolved

Bounty

$505.00

Submitted