CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-32094

CVE-2026-32094: Argument Injection via Incomplete Shell Escaping in shescape

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 11, 2026·5 min read·36 visits

Executive Summary (TL;DR)

shescape < 2.1.10 is vulnerable to argument injection due to unescaped square brackets, allowing attackers to exploit shell globbing for unauthorized file access.

The shescape library prior to version 2.1.10 fails to properly escape square brackets when targeting Unix-like shells. This omission allows attackers to leverage shell pathname expansion (globbing) to perform argument injection attacks, potentially exposing sensitive local files.

Vulnerability Overview

The shescape library provides utility functions for escaping strings intended for use in shell commands. The library is commonly used in Node.js applications to sanitize untrusted user input before passing it to functions like child_process.exec.

The vulnerability exists in the Shescape#escape() method when the library is configured to target Unix-like shells, specifically Bash, BusyBox sh, and Dash. In versions prior to 2.1.10, the escaping logic fails to neutralize specific shell metacharacters.

Because square brackets ([ and ]) are omitted from the library's escaping character set, attackers can supply input containing these characters to trigger unintended pathname expansion (globbing). This manipulation results in argument injection and exposes sensitive information to unauthorized actors, recorded under CWE-200.

Root Cause Analysis

The core issue resides in the regular expression used by shescape to identify special characters that require backslash escapes. The library relies on a blacklist approach to sanitize inputs destined for unquoted command strings.

Unix shells evaluate certain unquoted characters for pathname expansion before executing a command. While the library correctly escaped common globbing operators like * and ?, it omitted the square bracket characters [ and ], which are used to define character classes or ranges.

When shescape processes an input string containing square brackets, it returns the string unmodified. If an application interpolates this unmodified string into a command execution sink, the underlying shell interprets the brackets as globbing instructions, attempting to match the pattern against files in the current working directory.

Code Analysis

The vulnerable implementation defines a static regular expression containing the character class of metacharacters requiring escape sequences. This regex governs the sanitization process for target shells.

In src/internal/unix/bash.js, the pre-patch regular expression omits the square bracket characters entirely:

// Vulnerable: Missing [ and ] in the character class
const specials = new RegExp("([\"$&'()*;<>?`{|])", "g");

The fix, introduced in commit 6add105c6f6b508662bb5ae3b3bdd4c9bcebf37a, appends [ and \] to the character class. This modification ensures that the library prefixes these characters with a backslash during processing.

// Patched: Correctly includes [ and \] for escaping
const specials = new RegExp("([\"$&'()*;<>?[\\]`{|])", "g");

While this patch addresses the direct globbing issue for standard shell configurations, developers must exercise caution if advanced shell features like extglob are enabled in Bash. Extended globbing patterns (e.g., @(...) or !(...)) require additional parsing logic that falls outside the scope of this specific patch.

Exploitation

Exploitation requires the target application to accept user input, process it through shescape.escape(), and interpolate the result directly into a shell command without enclosing it in quotes. The attacker must also have knowledge of or guess filenames present in the target directory.

Consider an attacker submitting the payload secret[12] to an application that constructs a command using the vulnerable library.

const shescape = require('shescape');
// Attacker provides: "secret[12]"
const userInput = req.body.filename; 
const escaped = shescape.escape(userInput); 
 
// Application executes the command
exec(`cat ${escaped}`);

When the shell executes cat secret[12], it performs pathname expansion. If files named secret1 and secret2 exist, the shell expands the single argument into two distinct arguments. The final executed command becomes cat secret1 secret2, processing multiple files instead of the single intended file.

Impact Assessment

The primary security impact is argument injection. By exploiting the unescaped globbing characters, an attacker forces the application to evaluate unintended files or parameters.

This behavior facilitates local file inclusion or sensitive information exposure. An attacker can systematically extract configuration files, logs, or credentials if the vulnerable application returns the output of the executed command in its HTTP response.

The vulnerability carries a CVSS v4.0 score of 6.9. The severity is bounded by the requirement that specific files must exist on the local filesystem to trigger the glob expansion. If the glob pattern does not match any existing files, the shell typically treats the string as a literal, neutralizing the attack.

Remediation

The definitive remediation is upgrading the shescape dependency to version 2.1.10 or later. This version contains the updated regular expressions for Bash, BusyBox sh, and Dash.

In environments where immediate patching is not feasible, developers must wrap the interpolated variables in single quotes within the shell command. Single quotes instruct the shell to treat all enclosed characters as string literals, preventing pathname expansion.

Additionally, developers can implement input validation to reject payloads containing unexpected characters. Rejecting inputs that contain [, ], *, or ? provides a robust defense-in-depth mechanism against shell expansion attacks.

Official Patches

ericcornelissenshescape v2.1.10 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
6.9/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Affected Systems

shescape < 2.1.10

Affected Versions Detail

Product
Affected Versions
Fixed Version
shescape
ericcornelissen
< 2.1.102.1.10
AttributeDetail
CWECWE-200
Attack VectorNetwork
CVSS v4.06.9
Exploit StatusProof of Concept
CISA KEVFalse
ImpactInformation Exposure

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
T1552Unsecured Credentials
Credential Access
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor

Exposure of Sensitive Information to an Unauthorized Actor

Vulnerability Timeline

Initial identification of missing bracket escaping in development branch
2026-03-07
Fix commit merged and Version 2.1.10 released
2026-03-10
Public disclosure of CVE-2026-32094
2026-03-11

References & Sources

  • [1]GitHub Advisory: GHSA-9jfh-9xrq-4vwm
  • [2]Fix Commit: 6add105c6f6b508662bb5ae3b3bdd4c9bcebf37a
  • [3]MITRE CWE-200

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-58197
8.8

CVE-2026-58197: Host Escape and Lateral Movement via Insecure Container Network Defaults in ToolHive

A high-severity access control vulnerability in ToolHive CLI before v0.30.1 and ToolHive Studio before v0.38.0 allows local containerized MCP servers to bypass network isolation. This enables malicious workloads to establish TCP/IP connections to administrative and control plane endpoints exposed on the host loopback interface.

Amit Schendel
Amit Schendel
7 views•8 min read
•1 day ago•CVE-2026-63405
5.9

CVE-2026-63405: Insufficient Verification of Data Authenticity in AnyCable Pusher REST API

AnyCable is a real-time communication server. Prior to version 1.6.15, its Pusher-compatible REST API suffered from an authentication bypass vulnerability because it failed to verify that the request body matched the signature-validated body_md5 parameter. This allows attackers to perform replay attacks with modified body contents.

Amit Schendel
Amit Schendel
8 views•5 min read
•1 day ago•CVE-2026-64847
6.8

CVE-2026-64847: Indefinite Denial of Service via Undrained Stderr in AnyIO Process Pool Workers

A denial-of-service vulnerability exists in AnyIO prior to version 4.14.2. Standard error streams of process-pool workers are connected to an operating system pipe that is never drained by the parent process. This allows a worker to fill the pipe buffer and deadlock indefinitely.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
12 views•5 min read
•1 day ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
7 views•5 min read
•1 day ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
9 views•6 min read