p PatchFirst

PatchFirst · Latest vulnerabilities

node-shell-quote vulnerabilities

Vulnerability published for node-shell-quote in the last 30 days: 1. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 3

  1. CVE-2026-102422

    Critical · CVSS 9.2EPSS 0.38%Public exploitNo fix published

    shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token

    shell-quote's `quote()` function 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 (\n, \r, U+2028, U+2029) in that later string therefore ends the comment, and the rest of the string is parsed as shell input: `quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#'])` runs `id` in sh, bash, dash, ksh and zsh. `parse()` emits a comment token for a `#` in the middle of a word (for example `http://example.com/#frag`), so callers that combine `parse()` output with another untrusted string, such as `quote(parse(untrustedCommand)

    Published Updated
  2. CVE-2026-13311

    High · CVSS 8.7EPSS 0.36%No fix published

    shell-quote parse() is quadratic in token count, enabling denial of service

    shell-quote prior to 1.8.5 finalizes parsed tokens in parse() using Array.prototype.concat as a reduce accumulator, which reallocates and copies the entire growing array on every iteration. As a result parse() runs in O(n^2) time relative to the number of input tokens. An attacker who can supply an attacker-controlled string to any code path that calls parse() (no shell metacharacters are required; plain space-separated words suffice) can block the single-threaded Node.js event loop for an extended period with a small input, resulting in a denial of service. There is no code execution or data disclosure; impact is to availability only. Fixed

    Published Updated
  3. CVE-2026-9277

    Critical · CVSS 9.2EPSS 0.79%Fix available

    shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`

    shell-quote's `quote()` function did not validate object-token inputs against the operator model used by `parse()`. The `.op` field was backslash-escaped character by character using `/(.)/g`, which in JavaScript does not match line terminators (\n, \r, U+2028, U+2029). A line terminator in `.op` therefore passed through unescaped into the output; POSIX shells treat a literal newline as a command separator, so any content after it would execute as a second command. The vulnerable code path is reachable in two ways: (1) direct construction of `{ op: '...\n...' }` from external input, and (2) via `parse(cmd, envFn)` when `envFn` returns object

    • Update to 1.7.3+~1.7.1-1ubuntu0.1~esm1
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →