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.
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).
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 — serious impact or readily exploitable. Prioritize remediation.
Affected deno Versions
deno · rust versions < 2.6.8 are affected.
How to Reproduce CVE-2026-27190
pruva-verify REPRO-2026-00110 curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00110/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh 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
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_processpolyfill (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:
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.
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
- Added
Additional fix: The shell metacharacter check in
transformDenoShellCommandwas expanded from:/[();&|<>`!]/to:
/[();&|<>`!\n\r]/This catches newline (
\n) and carriage return (\r) characters used for command injection.
Reproduction Steps
Execute
repro/reproduction_steps.shwhich:- Downloads Deno v2.6.7 (vulnerable version)
- Creates a PoC that uses
spawnSyncwithshell: trueand 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.tsfollowed bytouch /tmp/rce_proof
Expected evidence:
- The file
/tmp/rce_proofis created - Script outputs: "VULNERABILITY CONFIRMED: Command injection via newline in shell argument"
- Exit code: 0
- The file
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
- Immediate action: Upgrade to Deno v2.6.8 or later
- For developers:
- Avoid using
shell: truewith 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
- Avoid using
- Testing recommendations:
- Add test cases for shell metacharacter injection:
\n,\r,;,|,&,$(), backticks, etc. - Test both Unix and Windows platforms (different escaping requirements)
- Add test cases for shell metacharacter injection:
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.
curl -sL https://github.com/denoland/deno/commit/9132ad958c83a0d0b199de12b69b877f63edab4c.patch 2>/dev/null | head -200{"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]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 --versionArchive: 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
How to Fix CVE-2026-27190
Upgrade deno · rust to 2.6.8 or later.
FAQ: CVE-2026-27190
How does the CVE-2026-27190 command injection work?
Which versions of Deno are affected by CVE-2026-27190, and where is it fixed?
How severe is CVE-2026-27190?
How can I reproduce CVE-2026-27190?
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.