The command auto-approval module in CodeRider-Kilo contains an OS Command Injection vulnerability, rendering its whitelist security mechanism ineffective. The vulnerability stems from the incorrect use of an incompatible command parser (the Unix-based shell-quote library) to analyze commands on the Windows platform, coupled with a failure to correctly handle Windows CMD-specific escape sequences (^). Attackers can exploit this discrepancy between the parsing logic and the execution environment by constructing payloads such as git log ^" & malicious_command ^". The CodeRider-Kilo parser is deceived by the escape characters, misinterpreting the malicious command connector (&) as being within a protected string argument and thus auto-approving the command. However, the underlying Windows CMD interpreter ignores the escaped quotes, parsing and executing the subsequent malicious command directly. This allows attackers to achieve arbitrary Remote Code Execution (RCE) after bypassing what appears to be a legitimate Git whitelist check.
The vulnerability results from using the shell-quote library (based on Unix syntax) to parse commands on the Windows platform, while the actual interpreter is Windows CMD. The whitelist mechanism is based on this incorrect parser — the attacker constructs a payload in the form of 'git log ^" & malicious_command ^"', where the escape character (^) used in CMD is ignored by the shell-quote parser. The parser incorrectly interprets the & operator as part of a protected string argument and automatically approves the command as an ostensibly safe Git reference. However, Windows CMD ignores escaped quotes, correctly parses the & separator, and executes the malicious command directly, completely bypassing the whitelist mechanism.
An attacker can obtain full remote code execution (RCE) on the victim's system without authentication, which with a CVSS:3.1 AV:N/AC:L/PR:N/UI:N/S:C vector leads to complete loss of confidentiality, integrity, and availability of the system and potentially associated environments.
Apply patches available from the vendor according to the references. As a temporary workaround, it is recommended to disable the command auto-approval module and restrict network access to the service at the firewall level to trusted hosts.
CodeRider-Kilo (CodeRider product) running on the Windows platform — specific versions indicated in the vendor's references
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HCoderider Kilo Coderider
APPCoderider-Kilo≤ 2.3.6