shell-quote is vulnerable to OS Command Injection
81
CVE Score
High
OS Command Injection
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.
Upgrade the shell-quote library to the patch version.
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.
1.8.4 - 1.10.0
Fixed in 1.11.0shell-quote is vulnerable to OS Command Injection in versions 1.8.4 - 1.10.0.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.