CVE-2026-22864
JSON

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 packageVersionsReported by
denoland deno< 2.5.6CVE List
deno (crates.io)before 2.5.6GitHub Advisory Database
deno denobefore 2.5.6NVD

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-77

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

Sources

SourceRecordLicence
CVE ListCVE-2026-22864 changed 2026-01-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-m3c4-prhw-mrx6 changed 2026-02-03CC-BY-4.0
NVDCVE-2026-22864 changed 2026-06-17Public domain