Description

The Deno project has announced a new security advisory addressing a command injection vulnerability on Windows systems, identified as CVE-2025-61787 and rated CVSS 8.1 (High). This flaw, which impacts Deno versions up to 2.5.1, could enable attackers to execute arbitrary commands when batch files are launched under certain conditions. Deno versions up to 2.5.1 are susceptible to command line injection vulnerabilities on Windows when executing batch files. This issue poses a serious risk to developers and production environments relying on Deno for script automation or orchestration on Windows, as it may allow malicious commands to run outside the intended context. The vulnerability stems from a long-standing peculiarity in Windows process creation, specifically the behavior of the CreateProcess function API. The advisory notes that in Windows, CreateProcess function always implicitly spawns cmd[.]exe when executing batch files, even if the application doesn’t specify it on the command line. As a result, when developers invoke batch files via Deno’s process APIs, Windows automatically routes the execution through cmd[.]exe. This implicit behavior introduces the risk of command injection if user-supplied arguments are passed to such scripts. To illustrate the impact, the Deno security team shared two proof-of-concept examples, one using Node[.]js’s child_process module and another using Deno[.]Command.spawn function. In these cases, Windows interprets the calc[.]exe argument as a directive to open the Calculator app, demonstrating how attackers could leverage arbitrary command execution. The vulnerability affects all Windows setups running Deno versions 2.5.1 and earlier. The Deno maintainers have released patched versions to resolve the issue: 2.2.15 (backported security fix) and 2.5.2 (latest stable release). All users are advised to upgrade to one of the patched versions immediately. Use endpoint protection or runtime monitoring tools to detect suspicious command executions like cmd[.]exe launching unexpected processes.