Advisory

GHSA-m3c4-prhw-mrx6

Also known as: CVE-2026-22864

Summary

Deno has an incomplete fix for command-injection prevention on Windows — case-insensitive extension bypass

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-01-16 15:49 UTC
Modified
2026-02-03 03:17 UTC

Affected packages and fixes

deno

crates.io · All systems

Affected

  • introduced 0, fixed 2.5.6 (semver)

Fixed versions

2.5.6

Fix

  • Fixed version 2.5.6
    cargo update -p deno --precise 2.5.6

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences