p PatchFirst

PatchFirst · Latest vulnerabilities

shescape vulnerabilities

Vulnerabilities published for shescape in the last 30 days: 0. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 13

  1. CVE-2026-73414

    Critical · CVSS 9.2EPSS 0.89%Fix available

    Shescape: Shell injection via unescaped parentheses on Windows with CMD

    Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.

    • Update to 2.1.14
    • Update to 3.0.1
    Published Updated
  2. CVE-2026-73413

    High · CVSS 8.7EPSS 0.59%Fix available

    Shescape: Quadratic-time denial of service in flag-protection

    Shescape is a simple shell escape library for JavaScript. From 2.1.11 until 2.1.14 and 3.0.1, the flag-protection loop in compose in src/internal/compose.js repeatedly joins and slices flag fragments when flagProtection is enabled, which is the default, making processing quadratic in input size across the escape, escapeAll, quote, and quoteAll APIs. An attacker who can supply a large untrusted input containing many flag fragments can consume CPU and cause denial of service. This issue is fixed in versions 2.1.14 and 3.0.1.

    • Update to 2.1.14
    • Update to 3.0.1
    Published Updated
  3. CVE-2026-73412

    Medium · CVSS 6.3EPSS 0.61%Fix available

    Shescape: Path disclosure on Unix with Zsh

    Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, this impacts users of Shescape on Unix systems that explicitly configure shell to Zsh, or true when the default shell is Zsh, using the escape and escapeAll. The Zsh options EXTENDED_GLOB and MAGIC_EQUAL_SUBST exacerbate the problem. In certain case, an attacker can leverage home directory expansion and extended glob syntax to obtain lists of files and directories on the system. Depending on what the command does, this may be used to leak more information. This issue is fixed in versions 2.1.14 and 3.0.1.

    • Update to 2.1.14
    • Update to 3.0.1
    Published Updated
  4. CVE-2026-73411

    Medium · CVSS 6.3EPSS 0.59%Fix available

    Shescape: Home-directory disclosure in assignment context on Unix with Dash

    Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/unix/dash.js fails to escape ~ after : or = when applications use the escape or escapeAll APIs on Unix with shell set to dash, or with shell set to true when Dash is the default, and interpolate the result into an assignment prefixed to a command. An attacker who controls the input can supply a value such as :~ to disclose the home-directory path and may change the location on which the command operates. This issue is fixed in versions 2.1.14 and 3.0.1.

    • Update to 2.1.14
    • Update to 3.0.1
    Published Updated
  5. CVE-2026-32094

    Medium · CVSS 6.9EPSS 0.23%Fix available

    Shescape escape() leaves bracket glob expansion active on Bash, BusyBox, and Dash

    Shescape is a simple shell escape library for JavaScript. Prior to 2.1.10, Shescape#escape() does not escape square-bracket glob syntax for Bash, BusyBox sh, and Dash. Applications that interpolate the return value directly into a shell command string can cause an attacker-controlled value like secret[12] to expand into multiple filesystem matches instead of a single literal argument, turning one argument into multiple trusted-pathname matches. This vulnerability is fixed in 2.1.10.

    • Update to 2.1.10
    Published Updated
  6. CVE-2025-30222

    Low · CVSS 2.1EPSS 0.19%Fix available

    Shescape has potential environment variable exposure on Windows with CMD

    Shescape is a simple shell escape library for JavaScript. Versions 1.7.2 through 2.1.1 are vulnerable to potential environment variable exposure on Windows with CMD. This impact users of Shescape on Windows that explicitly configure `shell: 'cmd.exe'` or `shell: true` using any of `quote`/`quoteAll`/`escape`/`escapeAll`. An attacker may be able to get read-only access to environment variables. This bug has been patched in v2.1.2. For those who are already using v2 of Shescape, no further changes are required. Those who are are using v1 of Shescape should follow the migration guide to upgrade to v2. There is no plan to release a patch compatib

    • Update to 2.1.2
    Published Updated
  7. CVE-2023-40185

    Medium · CVSS 6.5EPSS 0.68%Fix available

    Shescape on Windows escaping may be bypassed in threaded context

    shescape is simple shell escape library for JavaScript. This may impact users that use Shescape on Windows in a threaded context. The vulnerability can result in Shescape escaping (or quoting) for the wrong shell, thus allowing attackers to bypass protections depending on the combination of expected and used shell. This bug has been patched in version 1.7.4.

    • Update to 1.7.4
    Published Updated
  8. CVE-2022-31179

    High · CVSS 8.1EPSS 1.42%Fix available

    Insufficient escaping of line feeds for CMD in shescape

    Shescape is a simple shell escape package for JavaScript. Versions prior to 1.5.8 were found to be subject to code injection on windows. This impacts users that use Shescape (any API function) to escape arguments for cmd.exe on Windows An attacker can omit all arguments following their input by including a line feed character (`'\n'`) in the payload. This bug has been patched in [v1.5.8] which you can upgrade to now. No further changes are required. Alternatively, line feed characters (`'\n'`) can be stripped out manually or the user input can be made the last argument (this only limits the impact).

    • Update to 1.5.8
    Published Updated
  9. CVE-2022-31180

    Critical · CVSS 9.8EPSS 1.99%Fix available

    Insufficient escaping of whitespace in shescape

    Shescape is a simple shell escape package for JavaScript. Affected versions were found to have insufficient escaping of white space when interpolating output. This issue only impacts users that use the `escape` or `escapeAll` functions with the `interpolation` option set to `true`. The result is that if an attacker is able to include whitespace in their input they can: 1. Invoke shell-specific behaviour through shell-specific special characters inserted directly after whitespace. 2. Invoke shell-specific behaviour through shell-specific special characters inserted or appearing after line terminating characters. 3. Invoke arbitrary commands by

    • Update to 1.5.8
    Published Updated
  10. CVE-2022-24725

    Medium · CVSS 6.2EPSS 0.5%Fix available

    Exposure of home directory through shescape on Unix with Bash

    Shescape is a shell escape package for JavaScript. An issue in versions 1.4.0 to 1.5.1 allows for exposure of the home directory on Unix systems when using Bash with the `escape` or `escapeAll` functions from the _shescape_ API with the `interpolation` option set to `true`. Other tested shells, Dash and Zsh, are not affected. Depending on how the output of _shescape_ is used, directory traversal may be possible in the application using _shescape_. The issue was patched in version 1.5.1. As a workaround, manually escape all instances of the tilde character (`~`) using `arg.replace(/~/g, "\\~")`.

    • Update to 1.5.1
    Published Updated
  11. CVE-2021-21384

    Medium · CVSS 6.3EPSS 0.58%Fix available

    Null characters not escaped in shescape

    shescape is a simple shell escape package for JavaScript. In shescape before version 1.1.3, anyone using _Shescape_ to defend against shell injection may still be vulnerable against shell injection if the attacker manages to insert a into the payload. For an example see the referenced GitHub Security Advisory. The problem has been patched in version 1.1.3. No further changes are required.

    • Update to 1.1.3
    Published Updated

Check your server

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

Check your server →