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·31 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

•about 3 hours ago•CVE-2026-11748
6.9

CVE-2026-11748: Unauthenticated LDAP Injection in Central Dogma Server Authentication

An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.

Alon Barad
Alon Barad
3 views•6 min read
•about 4 hours ago•CVE-2026-11746
9.4

CVE-2026-11746: Use of Hard-coded ZooKeeper Replication Secret 'ch4n63m3' in Central Dogma Server

CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 5 hours ago•CVE-2026-56665
4.2

CVE-2026-56665: Logical Validation Bypass in ZITADEL External JWT Identity Provider

A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.

Alon Barad
Alon Barad
3 views•7 min read
•about 6 hours ago•CVE-2026-59149
6.5

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 7 hours ago•CVE-2026-59148
8.8

CVE-2026-59148: Unauthenticated Administrative API and CORS Misconfiguration in Mockoon

An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.

Alon Barad
Alon Barad
4 views•6 min read
•about 8 hours ago•CVE-2026-56666
4.8

CVE-2026-56666: Account Takeover via Improper Email Verification in ZITADEL Federated Identity Handler

An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.

Amit Schendel
Amit Schendel
2 views•7 min read