Intel

AIKIDO-2026-972994

shell-quote is vulnerable to OS Command Injection

CVE-2026-102422Published Oct 2, 2026
October 2, 2026

81

CVE Score

High

OS Command Injection

Are you affected? Scan for Free

TL;DR

quote() emits a { comment } token as # followed by its text, which comments out the rest of the shell line, including the opening quote of any later string token. A line terminator inside a later token ends that comment early, so the remainder of the token is parsed and executed as shell input when the output is passed to sh, bash, dash, ksh, or zsh. parse() can also emit a mid-word comment token, for example from a URL fragment like http://example.com/#frag, so callers that combine parse() output with another untrusted string reach the same sink through quote(parse(untrustedCommand).concat(untrustedArg)). The fix makes quote() throw a TypeError when any string token after a { comment } token contains a line terminator.

How do I fix this?

Upgrade the shell-quote library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range, and you call quote() with a { comment } token followed by another token containing a line terminator.

Versions

1.8.4 - 1.10.0

Fixed in 1.11.0

Background info

shell-quote is vulnerable to OS Command Injection in versions 1.8.4 - 1.10.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea