Thursday, December 12, 2024
Homecyber securityCritical Rust Vulnerability Let Hackers Inject Commands on Windows Systems

Critical Rust Vulnerability Let Hackers Inject Commands on Windows Systems

Published on

SIEM as a Service

A new critical vulnerability has been discovered in two of the Rust standard libraries, which could allow a threat actor to execute shell commands on vulnerable versions.

This vulnerability has been assigned CVE-2024-24576, and its severity has been given as 10.0 (Critical).

In this report, Rust Security Response stated that they have not identified a solution yet but have created a workaround to mitigate this vulnerability.

- Advertisement - SIEM as a Service

This vulnerability was credited to RyotaK and Simon Sawicki (Grub4K) for helping them fix it.

Critical Rust Vulnerability

According to the reports shared with Cyber Security News, this vulnerability exists due to insufficient validation of arguments passed to Command::arg and Command::args APIs. 

The documentation of these two APIs states that the arguments passed to the APIs directly to the spawned process, and it will not be evaluated by a shell.

In addition, the implementation of these two APIs is complicated due to the fact that the Windows API passes all of the provided arguments as a single string, leaving the splitting process with the spawned process.

Document
Stop Advanced Phishing Attack With AI

AI-Powered Protection for Business Email Security

Trustifi’s Advanced threat protection prevents the widest spectrum of sophisticated attacks before they reach a user’s mailbox. Stopping 99% of phishing attacks missed by other email security solutions. .

However, the cmd.exe process has a different splitting logic in Windows as it forces the standard library to perform the escaping for the arguments.

Nevertheless, this escaping sequence was not sufficiently validated, making it easier for threat actors to pass malicious arguments to the spawned process to execute arbitrary shell code. 

As a means of mitigating this vulnerability, Rust Security response team improved the escaping code with strong implementations and has made the Command API to return an InvalidInput error if it cannot safely escape any argument. 

Moreover, this error will be thrown during the process of spawning. For Windows users, the CommandExt::raw_arg method can be used to bypass the standard library’s escaping logic used by the cmd.exe process. 

Affected Versions And Fix

This vulnerability affects all the Rust versions earlier than 1.77.2 on Windows if any code or dependencies execute batch files with untrusted arguments.

Other platforms are not affected by this vulnerability.

To fix this, the Rust Security response team has recommended upgrading Rust to the latest version, 1.77.2, to prevent any unauthorized malicious threat actors from exploiting this vulnerability.

Secure your emails in a heartbeat! To find your ideal email security vendor, Take a Free 30-Second Assessment.

Eswar
Eswar
Eswar is a Cyber security content editor with a passion for creating captivating and informative content. With years of experience under his belt in Cyber Security, he is covering Cyber Security News, technology and other news.

Latest articles

Resecurity introduces Government Security Operations Center (GSOC) at NATO Edge 2024

Resecurity, a global leader in cybersecurity solutions, unveiled its advanced Government Security Operations Center...

Reserachers Uncovered Zloader DNS Tunneling Tactics For Stealthy C2 Communication

Zloader, a sophisticated Trojan, has recently evolved with features that enhance its stealth and...

US Charged Chinese Hackers for Exploiting Thousands of Firewall

The US Treasury Department's Office of Foreign Assets Control (OFAC) has sanctioned Sichuan Silence...

DMD Diamond Launches Open Beta for v4 Blockchain Ahead of 2025 Mainnet

DMD Diamond - one of the oldest blockchain projects in the space has announced the...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

DMD Diamond Launches Open Beta for v4 Blockchain Ahead of 2025 Mainnet

DMD Diamond - one of the oldest blockchain projects in the space has announced the...

Windows RDP Service Flaw let Hackers Execute Remote Code

A critical security vulnerability (CVE-2024-49115) in Windows Remote Desktop Services (RDS) has been disclosed,...

Ivanti CSA Vulnerabilities Let Attackers Gain Admin Access

 Ivanti has issued critical software updates to address several severe vulnerabilities in its Cloud...