A critical flaw has been discovered in the Rust standard library that could lead to serious command injection attacks against Windows users. The BatBadBut vulnerability, tracked as CVE-2024-24576, carries the highest possible CVSS score of 10.0, indicating the utmost severity. However, its impact is limited to scenarios where batch files are invoked on Windows systems with untrusted arguments.
The Windows security flaw BatBadBut was identified by a security engineer from Flatt Security known as RyotaK. This researcher reported this critical vulnerability in Windows systems to the CERT Coordination Center (CERT/CC) and published an analysis on April 9, 2024.
The BatBadBut exploit affects how the Rust standard library handles arguments when invoking batch files (.bat and .cmd) on Windows using the Command API. The Rust Security Response Working Group released an advisory about the issue on the same day.
Recent reports claim that the BatBadBut allows attackers to perform command injection on Windows applications that indirectly rely on the ‘CreateProcess’ function under certain conditions. The vulnerability arises because the CreateProcess function implicitly launches cmd.exe when running batch files, regardless of whether the application specifies them.
Cmd.exe has complex parsing rules for command arguments, and programming languages often fail to properly escape these arguments. An attacker who can control the arguments passed to the spawned process can potentially execute arbitrary shell commands by circumventing escaping mechanisms.
Despite receiving a perfect CVSS score of 10.0, the actual risk posed by BatBadBut may not be as high as the score suggests. According to RyotaK, the real-world exploit targeting Windows systems depends on a few conditions:
The high CVSS score is partly due to how scores are calculated for libraries. According to CVSS v3.1 guidelines, a library’s score should reflect the worst-case scenario, which can lead to high scores even when specific conditions are required.
Given the specific requirements for exploiting cybersecurity risk BatBadBut, the real-world risk may be lower than initially assumed. Nonetheless, organizations and developers should take precautions:
The Windows security vulnerability disclosure revealed a critical flaw in the operating system that could allow attackers to gain unauthorized access. While the BatBadBut vulnerability poses a serious risk to Windows systems, its exploitability is contingent on several specific conditions.
Organizations should stay vigilant by updating Rust libraries and implementing robust security measures, including a Windows patch for BatBadBut. Although the perfect CVSS score underscores the severity of the flaw, recalculating the score based on FIRST’s recommendations may provide a more accurate assessment of the risk in practical terms.
The sources for this piece include articles in The Hacker News and Bleeping Computer.
The post BatBadBut Vulnerability Exposes Windows Systems To Attacks appeared first on TuxCare.
*** This is a Security Bloggers Network syndicated blog from TuxCare authored by Wajahat Raja. Read the original post at: https://tuxcare.com/blog/batbadbut-vulnerability-exposes-windows-systems-to-attacks/