Skip to content

CVE-2026-27190: Verified Repro With Script Download

CVE-2026-27190: Deno Command Injection via Incomplete Metacharacter Blocklist

CVE-2026-27190 is verified against deno · rust. Affected versions: < 2.6.8. Fixed in 2.6.8. Vulnerability class: Command Injection. This high reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00110.

REPRO-2026-00110 deno · rust Command Injection Feb 20, 2026 CVE entry ↗ .txt
Severity
HIGH
CVSS
8.1
Reproduced in
10m 5s
Tool calls
75
Spend
$0.27
01 · Overview

What Is CVE-2026-27190?

CVE-2026-27190 is a high-severity command injection vulnerability in Deno's node:child_process compatibility layer, where arguments passed to spawn/spawnSync with shell: true were not properly escaped, letting embedded shell metacharacters be interpreted as command separators. Pruva reproduced it (reproduction REPRO-2026-00110).

02 · Severity & CVSS

CVE-2026-27190 Severity & CVSS Score

CVE-2026-27190 is rated high severity, with a CVSS base score of 8.1 out of 10.

HIGH threat level
8.1 / 10 CVSS base
03 · Affected Versions

Affected deno Versions

deno · rust versions < 2.6.8 are affected.

How to Reproduce CVE-2026-27190

$ pruva-verify REPRO-2026-00110
or curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00110/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh
Run in a VM or disposable container. This exploits a real vulnerability.
06 · Proof of Reproduction

Proof of Reproduction for CVE-2026-27190

Reproduced by Pruva's autonomous agents — 75 tool calls over 10 min. Full root-cause analysis and the complete transcript are below.

How the agent worked 233 events · 75 tool calls · 10 min
10 minDuration
75Tool calls
50Reasoning steps
233Events
4Dead-ends
Agent activity over 10 min
Support
17
Repro
53
Variant
159
0:0010:05

Root Cause and Exploit Chain for CVE-2026-27190

Summary

A command injection vulnerability exists in Deno's node:child_process implementation (specifically in the spawnSync and spawn functions). When using shell: true option with arguments passed as an array, the arguments were not properly escaped before being joined into a shell command string. This allowed shell metacharacters (particularly newlines \n and carriage returns \r) embedded in argument values to be interpreted by the shell as command separators, enabling arbitrary command execution.

Impact

  • Package: deno (Rust-based JavaScript/TypeScript runtime)
  • Affected Component: node:child_process polyfill (ext/node/polyfills/internal/child_process.ts)
  • Affected Versions: < 2.6.8
  • Patched Version: 2.6.8
  • Severity: HIGH (CVSS 8.1)
  • Consequences: Arbitrary code execution when user-controlled input is passed to spawn functions with shell: true

Root Cause

The vulnerability stems from improper argument escaping in the normalizeSpawnArguments function:

  1. Before the fix (v2.6.7 and earlier):

    if (options.shell) {
      let command = ArrayPrototypeJoin([file, ...args], " ");
      // ...
    }
    

    Arguments were simply joined with spaces, making no attempt to escape shell metacharacters.

  2. The fix (commit 9132ad958c83a0d0b199de12b69b877f63edab4c):

    • Added escapeShellArg() function that properly escapes shell arguments
    • On Unix: wraps arguments in single quotes and escapes embedded single quotes
    • On Windows: wraps in double quotes and escapes embedded double quotes and backslashes
    • Arguments are now escaped before being joined into the shell command
  3. Additional fix: The shell metacharacter check in transformDenoShellCommand was expanded from:

    /[();&|<>`!]/
    

    to:

    /[();&|<>`!\n\r]/
    

    This catches newline (\n) and carriage return (\r) characters used for command injection.

Reproduction Steps

  1. Execute repro/reproduction_steps.sh which:

    • Downloads Deno v2.6.7 (vulnerable version)
    • Creates a PoC that uses spawnSync with shell: true and a malicious argument containing a newline
    • The malicious argument: /tmp/legitimate.ts\ntouch /tmp/rce_proof
    • When the shell interprets this, it executes: deno run --allow-all /tmp/legitimate.ts followed by touch /tmp/rce_proof
  2. Expected evidence:

    • The file /tmp/rce_proof is created
    • Script outputs: "VULNERABILITY CONFIRMED: Command injection via newline in shell argument"
    • Exit code: 0

Evidence

  • Log files: logs/run1.log, logs/run2.log, logs/result.txt
  • Key excerpt from run1.log:
    Exploit worked: true
    VULNERABILITY CONFIRMED: Command injection via newline in shell argument
    
    === RESULT: VULNERABILITY CONFIRMED ===
    The newline command injection vulnerability is present in this version.
    Evidence: /tmp/rce_proof file was created via shell injection.
    -rw-r--r-- 1 root root 0 Feb 20 14:46 /tmp/rce_proof
    
  • Environment: Linux x86_64, Deno 2.6.7

Recommendations / Next Steps

  1. Immediate action: Upgrade to Deno v2.6.8 or later
  2. For developers:
    • Avoid using shell: true with user-controlled input when possible
    • If shell features are needed, validate and sanitize all arguments
    • Use shell: false (default) and pass arguments as arrays when shell interpretation is not required
  3. Testing recommendations:
    • Add test cases for shell metacharacter injection: \n, \r, ;, |, &, $(), backticks, etc.
    • Test both Unix and Windows platforms (different escaping requirements)

Additional Notes

  • Idempotency confirmed: The reproduction script was executed twice consecutively and confirmed the vulnerability both times.
  • Edge cases: The vulnerability affects both synchronous (spawnSync) and asynchronous (spawn) variants of child_process functions.
  • Platform notes: While this reproduction was tested on Linux, the same vulnerability exists on Windows with different shell metacharacter behaviors. The fix addresses both platforms with platform-specific escaping logic.

CVE-2026-27190 Reproduction Transcript

The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.

Full session Replay every step — scrub the timeline or play it back.

Event 1/40
0:001:50
0:00
session startedaccounts/fireworks/models/kimi-k2p5 · ghsa-hmh4-3xvx-q5hr · ghsa-hmh
0:15
0:28
0:39
web search
0:43
0:56
1:05
1:05
extract_facts
no facts extracted
1:05
1:05
1:05
supportrepro
1:38
1:38
1:38
1:40
1:42
web search
1:45
1:45
$curl -sL https://github.com/denoland/deno/commit/9132ad958c83a0d0b199de12b69b877f63edab4c.patch 2>/dev/null | head -200
0.3s
{"cwd":"/root/.pruva/runs/ghsa-hmh4-3xvx-q5hr_20260220-144417","duration_ms":258,"exit_code":0,"stderr":"","stdout":"From 9132ad958c83a0d0b199de12b69b877f63edab4c Mon Sep 17 00:00:00 2001\nFrom: Felipe Cardozo <fraifelipe@gmail.com>\nDate: Mon, 2 Feb 2026 10:17:42 -0300\nSubject: [PATCH] fix(ext/node): escape more shell args (#31999)\n\nFollow up to https://github.com/denoland/deno/pull/31838\n---\n ext/node/polyfills/internal/child_process.ts  |  50 ++++++-\n .../child_process_shell_escape/__test__.jsonc |  10 ++\n .../node/child_process_shell_escape/main.out  |  19 +++\n .../node/child_process_shell_escape/main.ts   | 124 ++++++++++++++++++\n 4 files changed, 201 insertions(+), 2 deletions(-)\n create mode 100644 tests/specs/node/child_process_shell_escape/__test__.jsonc\n create mode 100644 tests/specs/node/child_process_shell_escape/main.out\n create mode 100644 tests/specs/node/child_process_shell_escape/main.ts\n\ndiff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts\nindex 32e4dd951fd9e4..48b440d114abb1 100644\n--- a/ext/node/polyfills/internal/child_process.ts\n+++ b/ext/node/polyfills/internal/child_process.ts\n@@ -968,7 +… [truncated]
1:48
1:50
$mkdir -p repro logs && cd repro && curl -fsSL https://dl.deno.land/release/v2.6.7/deno-x86_64-unknown-linux-gnu.zip -o deno.zip && unzip -o deno.zip && chmod +x deno && ./deno --version
2.0s
Archive:  deno.zip
  inflating: deno                    
deno 2.6.7 (stable, release, x86_64-unknown-linux-gnu)
v8 14.5.201.2-rusty
typescript 5.9.2

Artifacts and Evidence for CVE-2026-27190

Scripts, logs, diffs, and output captured during the reproduction.

No artifacts available

08 · How to Fix

How to Fix CVE-2026-27190

Upgrade deno · rust to 2.6.8 or later.

Coming soon

Step-by-step mitigation and hardening guidance for CVE-2026-27190 — configuration checks, workarounds where no patch exists, and how to verify you're protected — is on the way.

10 · FAQ

FAQ: CVE-2026-27190

How does the CVE-2026-27190 command injection work?

When code calls spawn or spawnSync with shell: true and passes arguments as an array, an attacker-controlled argument value containing a newline (\n), carriage return (\r), or other shell metacharacter is joined unescaped into the command string. The shell then interprets that metacharacter as a command separator and executes the attacker's injected command alongside the intended one.

Which versions of Deno are affected by CVE-2026-27190, and where is it fixed?

Versions before 2.6.8 are affected. It is fixed in 2.6.8 (commit 9132ad958c83a0d0b199de12b69b877f63edab4c), which adds an escapeShellArg() function that wraps and escapes arguments for the target platform's shell.

How severe is CVE-2026-27190?

High severity (CVSS 8.1) -- arbitrary code execution when attacker-influenced input reaches a node:child_process spawn call configured with shell: true.

How can I reproduce CVE-2026-27190?

Download the verified script from this page and run it in an isolated environment against Deno before 2.6.8. It calls the node:child_process spawn/spawnSync API with shell: true and an argument containing a newline-based shell metacharacter, and shows the injected command executing alongside the intended one.
11 · References

References for CVE-2026-27190

Authoritative sources for CVE-2026-27190 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.