Skip to main content

Deno CVE-2025-61787

HIGH
Command Injection (CWE-77)
2025-10-08 security-advisories@github.com
8.1
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted argument to Deno app
  2. Exploit
    Argument forwarded to batch-file child process
  3. Execution
    cmd.exe implicitly parses injected shell metacharacters
  4. Impact
    Arbitrary command execution on Windows host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Command injection prevention
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires ALL of: (1) the target runs on Windows; (2) a Deno program spawns a batch file (.bat or .cmd) as a child process via Deno.Command or node:child_process; (3) the spawned process receives arguments derived from attacker-controlled input; and (4) the Deno program was granted the 'run' permission (the PoC also uses 'read'/'write' or 'env' as applicable). The root cause is Windows CreateProcess() implicitly invoking cmd.exe for batch files, so injected shell metacharacters in arguments are interpreted. Limiting factors: non-Windows platforms are entirely unaffected; applications that never execute .bat/.cmd files, or that do not pass untrusted data into child-process arguments, are not exploitable; and Deno's permission model must have granted run access.

Impact

Signals are mixed and point to a credible but conditional threat rather than a mass-exploitation emergency. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N) yields 8.1 (High) with full C/I/A impact, reflecting that successful exploitation gives arbitrary command execution - but the AC:H explicitly encodes meaningful preconditions (Windows-only, the application must spawn a .bat/.cmd file with attacker-influenced arguments and hold Deno's run permission). A publicly available exploit exists (the GHSA advisory ships two working PoCs that launch calc.exe), which raises practical risk, but this is NOT the same as active exploitation: the CVE is not listed in CISA KEV, so per precision rules the status is 'publicly available exploit code exists,' not in-the-wild use. EPSS of 2.08% (81st percentile) is moderate - elevated relative to most CVEs (consistent with public PoC availability) yet far from the high-probability band, which aligns with the AC:H gating and the narrow Windows-plus-batch-file scope. SSVC framing: exploitation = PoC, technical impact = total, but automatable is questionable because exploitation depends on application-specific use of child-process spawning with untrusted args. Net: a real priority specifically for Windows services/CI that shell out to batch files with external input, but lower urgency for the broad Deno install base that never spawns .bat/.cmd files. One data tension to flag: the 'Microsoft' vendor tag is misleading - Deno is an independent open-source project (Deno Land), not a Microsoft product, even though the flaw is Windows-specific.

Exploit ScenarioDerived

A Deno application running on Windows spawns a batch file (e.g. via new Deno.Command('./task.bat', { args: [...] }) or node:child_process spawn) and passes attacker-influenced values into its arguments. Because Windows CreateProcess() implicitly routes .bat/.cmd execution through cmd.exe, an argument such as '&calc.exe' is interpreted as a shell command, yielding arbitrary command execution. A public PoC in the GHSA advisory demonstrates this by launching calc.exe.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 2.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

Command injection on Windows in the Deno JavaScript/TypeScript runtime (versions prior to 2.5.3 and 2.2.15) allows attacker-supplied arguments to be interpreted as shell commands when a program spawns a .bat or .cmd file as a child process. The weakness is unauthenticated from a network vector (CVSS:3.1/AV:N/AC:H/PR:N/UI:N) and scores 8.1, but exploitation is conditional: it requires a Windows host, a Deno program that launches a batch file via Deno.Command or node:child_process, attacker-controlled data flowing into that process's arguments, and the 'run' permission having been granted. Publicly available exploit code exists, including a proof of concept in the GitHub security advisory that spawns calc.exe via an '&' metacharacter, and EPSS sits at 2.08% (81st percentile); there is no confirmed active exploitation (not in CISA KEV).

RemediationAI

Vendor-released patch: upgrade to Deno 2.5.3 or Deno 2.2.15 (the 2.5.x and 2.2.x maintenance lines respectively) via the standard Deno upgrade path or the release artifacts at https://github.com/denoland/deno/releases/tag/v2.5.3 and https://github.com/denoland/deno/releases/tag/v2.2.15. The upstream change is available as pull request https://github.com/denoland/deno/pull/30818 and commit https://github.com/denoland/deno/commit/8a0990ccd37bafd8768176ca64b906ba2da2d822 if you build Deno from source; after patching, attempts to spawn .bat/.cmd files directly will fail with Deno.errors.PermissionDenied rather than silently invoking cmd.exe. Where immediate upgrade is not possible, apply compensating controls: stop the Deno application from spawning .bat or .cmd files at all (rewrite batch launchers as direct native executables or pass the batch logic through an explicit, argument-validated shell invocation) - the trade-off is code rework for any Windows automation that relies on batch wrappers; strictly validate, allow-list, or quote-strip all values that flow into child-process argument arrays, since the injection is driven by metacharacters such as '&', '|', '^' and '>' - this is brittle because escaping rules differ between cmd.exe and CreateProcess; and tighten Deno's permission model so that 'run' (and, where the PoC applies, 'read'/'write'/'env') is granted only to trusted modules and never to code paths that consume untrusted input - this limits blast radius but does not remove the underlying Windows behavior. Because no vendor-level patch exists for Deno releases older than 2.2.15 short of manual backporting, treat 2.2.15 as the minimum supported line.

Affected Packages

cargo deno fix: 2.5.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in cargo

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-77 (Improper Neutralization of Special Elements used in a Command), triggered by a Windows platform behavior rather than a flaw in Deno's own argument parsing. Windows CreateProcess() implicitly launches cmd.exe whenever the target image is a batch file (.bat, .cmd, etc.), even though Deno never requests a shell. As a result, shell metacharacters embedded in the argument vector - for example '&calc.exe' - are interpreted by the implicit command interpreter instead of being passed as literal arguments, yielding arbitrary command execution in the context of the Deno process. The affected code path is Deno's Rust subprocess extension (ext/process/lib.rs, compute_run_cmd_and_check_permissions) plus the node:child_process compatibility layer; the fix adds a Windows-only guard that rejects spawning files whose extension is .bat or .cmd and returns a PermissionDenied error ('Use a shell to execute .bat or .cmd files'), forcing callers to explicitly opt into shell semantics. CPE entries (cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*) confirm the affected product is the Deno runtime itself across all pre-fix versions. Non-Windows platforms are structurally unaffected because they do not have an implicit shell-spawning step for batch files.

Know when Deno gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

AC:H because exploitation needs Windows plus an app that spawns a batch file with attacker-controlled args; PR:N as the attacker only supplies input; full C/I/A from arbitrary command execution.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions prior to 2.5.3 and 2.2.15 are vulnerable to Command Line Injection attacks on Windows when batch files are executed. In Windows, `CreateProcess() always implicitly spawns cmd.exe` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows. Versions 2.5.3 and 2.2.15 fix the issue.

Executive ViewAI

Why It Matters

The Deno JavaScript/TypeScript runtime on Windows is affected by a high-severity command injection vulnerability (CVE-2025-61787) that can allow an unauthenticated network attacker to execute arbitrary commands when a Deno program spawns a .bat or .cmd file with attacker-influenced arguments. Organizations using Deno in Windows-based production services, CI/CD pipelines, or developer workstations that launch batch scripts with external inputs should prioritize remediation because successful exploitation can lead to system compromise, though it requires specific conditions including the 'run' permission. Publicly available exploit code exists, making timely patching important.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
2.1%
Top 19% exploitable
Prevalence
Medium
popular modern JS/TS runtime, but smaller production footprint than Node.js
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 2.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

62
Low Medium High Critical
KEV: 0
EPSS: +2
CVSS: +40
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Affected Products (CPE)CVE.org

cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*
cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*

More in Deno

View all
CVE-2021-42139 CRITICAL POC
9.8 Oct 11

Deno Standard Modules before 0.107.0 allows Code Injection via an untrusted YAML file in certain configurations. Rated c

CVE-2025-48935 CRITICAL POC
9.1 Jun 04

Deno versions 2.2.0 through 2.2.4 contain an authorization bypass vulnerability in SQLite database handling that allows

CVE-2024-27934 HIGH POC
8.8 Mar 21

Deno is a JavaScript, TypeScript, and WebAssembly runtime. Rated high severity (CVSS 8.8), this vulnerability is low att

CVE-2024-27933 HIGH POC
8.8 Mar 21

Deno is a JavaScript, TypeScript, and WebAssembly runtime. Rated high severity (CVSS 8.8), this vulnerability is low att

CVE-2023-28446 HIGH POC
8.8 Mar 24

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Rated high

CVE-2024-27935 HIGH POC
8.3 Mar 21

Deno is a JavaScript, TypeScript, and WebAssembly runtime. Rated high severity (CVSS 8.3), this vulnerability is remotel

CVE-2026-27190 HIGH POC
8.1 Feb 20

Command injection in Deno versions prior to 2.6.8 allows unauthenticated remote attackers to execute arbitrary commands

CVE-2026-22864 HIGH POC
8.1 Jan 15

Arbitrary code execution in Deno runtime versions before 2.5.6 allows unauthenticated attackers to bypass shell script e

CVE-2026-22863 HIGH POC
7.5 Jan 15

Deno versions up to 2.6.0 contains a vulnerability that allows attackers to have infinite encryptions (CVSS 7.5).

CVE-2023-26103 HIGH POC
7.5 Feb 25

Versions of the package deno before 1.31.0 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the upg

CVE-2023-22499 HIGH POC
7.5 Jan 17

Deno is a runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Rated high severity (CVSS 7.5), this

CVE-2024-32477 HIGH POC
7.4 Apr 18

Deno is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults. Rated high severity (CVSS 7.4), this vul

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy