Arbitrary Command Injection Affecting shell-quote package, versions >=1.1.0 <1.8.4


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-SHELLQUOTE-16799355
  • published22 May 2026
  • disclosed22 May 2026
  • creditAkshat Sinha

Introduced: 22 May 2026

NewCVE-2026-9277  (opens in a new tab)
CWE-77  (opens in a new tab)

How to fix?

Upgrade shell-quote to version 1.8.4 or higher.

Overview

shell-quote is a package used to quote and parse shell commands.

Affected versions of this package are vulnerable to Arbitrary Command Injection via the quote() function when object-token inputs containing line terminators (\n, \r, U+2028, U+2029) in the .op field are not properly validated. An attacker can execute arbitrary commands by supplying crafted input that includes line terminators, which are interpreted as command separators by POSIX shells. The vulnerable path is reachable in two ways: by direct construction from external input ({ op: '...\n...' }) or by untrusted input being passed to parse(cmd, envFn) by envFn.

CVSS Base Scores

version 4.0
version 3.1