Critical Rust flaw enables Windows command injection attacks

Critical Rust flaw enables Windows command injection attacks

April 9, 2024 at 04:24PM

A critical security vulnerability, tracked as CVE-2024-24576, allows threat actors to exploit Rust’s standard library to execute malicious commands on Windows systems. GitHub rates this flaw with a maximum CVSS base score of 10/10. The Rust security team faced challenges in resolving the issue, prompting an urge from the White House to adopt memory-safe programming languages for improved software security.

Based on the meeting notes, here are the clear takeaways:

1. A security vulnerability in the Rust standard library, tracked as CVE-2024-24576, allows threat actors to exploit OS command and argument injection weaknesses to target Windows systems in command injection attacks. This flaw has been rated as critical severity by GitHub with a maximum CVSS base score of 10/10.

2. Unauthenticated attackers can exploit this vulnerability remotely in low-complexity attacks on Windows systems without user interaction.

3. The vulnerability specifically affects Rust versions before 1.77.2 on Windows when a program’s code or one of its dependencies invokes and executes batch files with untrusted arguments.

4. The Rust security team faced challenges with cmd.exe’s complexity and had to improve the robustness of the escaping code and modify the Command API in response to this vulnerability.

5. The response from the Rust Security Response working group included a recommendation to implement proper escaping or handle trusted inputs, and it also mentioned the CommandExt::raw_arg method as a possible bypass for the standard library’s escaping logic on Windows.

6. The White House Office of the National Cyber Director (ONCD) urged technology companies to adopt memory-safe programming languages like Rust in February, with the goal of improving software security by minimizing the number of memory safety vulnerabilities.

Full Article