8.1high
Deno has an incomplete fix for command-injection prevention on Windows — case-insensitive extension bypass
- Severity
- 8.1high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.68% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-m3c4-prhw-mrx6
Description
Deno is a JavaScript, TypeScript, and WebAssembly runtime. Before 2.5.6, 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.). This vulnerability is fixed in 2.5.6.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| denoland deno | < 2.5.6 | CVE List |
| deno (crates.io) | before 2.5.6 | GitHub Advisory Database |
| deno deno | before 2.5.6 | NVD |
All scores
| GitHub_M | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Deno is a JavaScript, TypeScript, and WebAssembly runtime. Before 2.5.6, 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.). This vulnerability is fixed in 2.5.6.
GitHub Advisory Database
Summary
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.).
POC
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:
photo_2025-10-10 02 27 23
Bypass of the patched vulnerability: photo_2025-10-10 02 27 25
Impact
The script launches calc.exe on Windows, demonstrating that passing user-controlled arguments to a spawned batch script can result in command-line injection.
Mitigation
Users should update to Deno v2.5.6 or newer.
NVD (es)
Deno es un entorno de ejecución de JavaScript, TypeScript y WebAssembly. Antes de 2.5.6, un parche anterior tenía como objetivo bloquear la ejecución de archivos batch/shell de Windows devolviendo un error cuando la extensión de una ruta ejecutada coincidía con .bat o .cmd. Esa verificación realiza una comparación que distingue entre mayúsculas y minúsculas contra literales en minúsculas y por lo tanto puede ser eludida cuando la extensión utiliza un uso de mayúsculas y minúsculas alternativo (por ejemplo, .BAT, .Bat, etc.). Esta vulnerabilidad está corregida en 2.5.6.
References
| https://github.com/denoland/deno/security/advisories/GHSA-m3c4-prhw-mrx6 | exploit, vendor-advisory, web | |
| https://github.com/denoland/deno/releases/tag/v2.5.6 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-22864 | advisory | |
| https://github.com/denoland/deno | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-22864 changed 2026-01-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-m3c4-prhw-mrx6 changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2026-22864 changed 2026-06-17 | Public domain |