Junglewise Threat Intelligence

CVE-2026-32094: Shescape escape() bracket glob expansion bypass on Bash, BusyBox, and Dash

CVE-2026-32094 · Severity: medium · CVSS 4 · Published 2026-03-11

Technologies: shescape (npm). Vendors: npm.

Executive brief

Shescape is a Node.js library that sanitizes untrusted arguments before passing them to shell commands. A flaw in its escape() method fails to properly handle square-bracket glob syntax on Bash, BusyBox, and Dash shells, allowing an attacker to expand a single argument into multiple filesystem matches. This can leak directory listings, target unintended files, or alter command behavior in ways the application did not intend.

Technical details

The vulnerability is an incomplete input validation flaw in Shescape's escape() method. The vulnerable code escapes shell metacharacters like *, /, and ? but omits square brackets [ and ] from the character set requiring escaping. When escape(input) is called with a string like "secret[12]", it returns the unquoted literal "secret[12]", which the shell then interprets as a glob pattern matching files named secret1 and secret2. An attacker can craft bracket patterns like ".n[dpv]mrc" to expand into multiple directory entries. The vulnerability affects all versions before 2.1.10 and requires no authentication or special privileges—only that the application uses Shescape's escape() or escapeAll() methods with Bash, BusyBox, or Dash and directly interpolates the result into a shell command string. The patch in v2.1.10 adds [ and ] to the escape character set.

Affected products

  • Shescape Shescape <2.1.10

Timeline

  • 2026-03-11: disclosed: GHSA-9jfh-9xrq-4vwm published
  • 2026-03-13: patched: Version 2.1.10 released with fix

References

Related threats