A prior patch aimed to block spawning Windows batch/shell files by returning an error when a spawned path’s extension matched .bat or .cmd. That check performs a case-sensitive comparison against lowercase literals and therefore can be bypassed when the extension uses alternate casing (for example .BAT, .Bat, etc.).
const command = new Deno.Command('./test.BAT', {
args: ['&calc.exe'],
});
const child = command.spawn();
This causes calc.exe to be launched; see the attached screenshot for evidence.
Patched in CVE-2025-61787 — prevents execution of .bat and .cmd files:
Bypass of the patched vulnerability:
The script launches calc.exe on Windows, demonstrating that passing user-controlled arguments to a spawned batch script can result in command-line injection.
Users should update to Deno v2.5.6 or newer.
{
"sources": [
{
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-22864",
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22864",
"modified": "2026-01-21T14:32:39.837Z",
"id": "CVE-2026-22864",
"imported": "2026-04-14T12:58:55.197Z",
"published": "2026-01-15T23:15:51.937Z"
},
{
"url": "https://api.github.com/advisories/GHSA-m3c4-prhw-mrx6",
"html_url": "https://github.com/advisories/GHSA-m3c4-prhw-mrx6",
"modified": "2026-01-27T16:49:29Z",
"id": "GHSA-m3c4-prhw-mrx6",
"imported": "2026-04-14T12:59:06.994Z",
"published": "2026-01-16T15:49:38Z"
},
{
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-2935",
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-2935",
"modified": "2026-01-16T17:16:02Z",
"id": "EUVD-2026-2935",
"imported": "2026-04-14T12:58:57.054Z",
"published": "2026-01-15T22:58:52Z"
}
],
"license": "CC-BY-4.0"
}