Nov 18, 2026·8 min read·1 visit
@augment-vir/node versions prior to 31.73.5 are vulnerable to OS command injection in the grep() helper function because search patterns are interpolated into a bash shell command string without neutralizing command substitution syntax ($() and backticks). Upgrading to version 31.73.5 resolves the flaw by invoking /usr/bin/grep directly via child_process.spawn() without a shell.
An OS command injection vulnerability (CWE-78) exists in the @augment-vir/node package prior to version 31.73.5. The grep() utility function builds a shell command string by interpolating caller-supplied search patterns inside double quotes and executes the string through bash via runShellCommand(). Because bash evaluates command substitution expressions inside double-quoted strings, an attacker controlling the search pattern input can execute arbitrary OS commands with the privileges of the Node.js runtime.
The @augment-vir/node package is the Node.js runtime utility library within the augment-vir TypeScript monorepo developed by electrovir. Among its file system helpers, the package exports a grep() wrapper function (packages/node/src/augments/fs/grep.ts) designed to invoke the host system's native grep binary and parse matching files or line outputs into structured JavaScript arrays.
In versions prior to 31.73.5, the grep() function constructs a single command string by concatenating command-line flags, search patterns, and target file paths, then passes that string to an internal runShellCommand() wrapper. The runShellCommand() helper executes commands using Node.js child_process.spawn() with the option shell: 'bash' explicitly enabled.
This architecture exposes an OS Command Injection vulnerability tracked as CVE-2026-63496 (GHSA-xvcc-vqjv-phqh) and classified under CWE-78. When caller-supplied pattern or patterns values are formatted into the command string, they are enclosed in double quotes (-e "${searchPattern}"). Because the command runs inside a bash subshell, bash parses and executes any embedded command substitution syntax—such as $(...) or backticks (`...`)—prior to invoking the /usr/bin/grep binary.
Any downstream application, CLI tool, test runner, or service that passes untrusted input into the grep() helper's pattern fields allows an attacker to execute arbitrary operating system commands under the security context of the running Node.js process.
The root cause of CVE-2026-63496 is the combination of shell-mediated command execution (shell: 'bash') and incomplete input sanitization when constructing command arguments in packages/node/src/augments/fs/grep.ts.
To prepare arguments for shell execution, the vulnerable implementation defines a local escape() helper function intended to sanitize user input before wrapping it in double quotes. This function solely strips newline characters (\n) and escapes double-quote characters (") with a preceding backslash (\"). While this prevents an attacker from breaking out of the double-quoted string boundary to append new space-delimited flags, it fails to account for how POSIX shells and bash evaluate double-quoted strings.
In bash, double quotes suppress word splitting and pathname expansion, but they explicitly permit three forms of shell expansion:
$(command) or `command` are executed in a subshell, and their standard output replaces the expression.$ (such as $PATH or ${USER}) are expanded to their environment values.$((...)) are evaluated.Furthermore, while file and directory search locations (file, files, dir, dirs) were passed through escape(), the searchPatterns array was interpolated directly into -e "${searchPattern}" without calling escape() at all. Consequently, an attacker supplying a search pattern can inject command substitutions inside the double quotes or inject a literal " to break out of the quoted argument entirely and chain arbitrary shell commands using ;, |, or &&.
Examining the source code in packages/node/src/augments/fs/grep.ts prior to version 31.73.5 illustrates how the command string was assembled and passed to the shell:
// Vulnerable implementation in packages/node/src/augments/fs/grep.ts (< 31.73.5)
function escape(input: string) {
// Only escapes double quotes and removes newlines; leaves $, `, and \ intact
return input.replaceAll('"', String.raw`\"`).replaceAll('\n', '');
}
// ...
const searchPatterns: string[] = (
'pattern' in grepSearchPattern ? [grepSearchPattern.pattern] : grepSearchPattern.patterns
).filter(check.isTruthy);
const fullCommand = [
'grep',
'--no-messages',
options.invertMatch ? '--invert-match' : '',
options.countOnly ? '--count' : '',
options.lineNumber ? '--line-number' : '',
options.ignoreCase ? '--ignore-case' : '',
options.filesOnly ? '--files-with-matches' : '--with-filename',
patternFlag,
options.include ? `--include="${escape(options.include)}"` : '',
options.exclude ? `--exclude="${escape(options.exclude)}"` : '',
recursive ? '-r' : '',
'--null',
// VULNERABILITY: searchPattern is interpolated directly into double quotes
...searchPatterns.map((searchPattern) => `-e "${searchPattern}"`),
...searchParts,
]
.filter(check.isTruthy)
.join(' ');
// Executes fullCommand inside a bash shell
const result = await runShellCommand(fullCommand, {
cwd: options.cwd,
});In commit 9e1a3592903a56e500959be72276ede1708c3437, the maintainer refactored grep.ts to eliminate shell execution entirely. Instead of concatenating a single string for runShellCommand(), the patched code constructs an array of discrete argument strings (grepArgs) and passes them directly to /usr/bin/grep using Node.js child_process.spawn() with default shell settings (shell: false):
// Patched implementation in packages/node/src/augments/fs/grep.ts (v31.73.5)
import {spawn} from 'node:child_process';
const grepBinPath = '/usr/bin/grep';
function spawnGrepProcess({
args,
cwd,
}: {
args: ReadonlyArray<string>;
cwd: string | undefined;
}) {
// FIX 1: Direct binary execution via spawn() without invoking a shell
return spawn(grepBinPath, args, {
cwd,
stdio: [
'ignore',
'pipe',
'pipe',
],
});
}
// ...
const grepArgs: string[] = [
'--no-messages',
...(options.invertMatch ? ['--invert-match'] : []),
// ... additional validated flag arrays ...
// FIX 2: Each pattern is passed as a discrete argv element following '-e'
...searchPatterns.flatMap((searchPattern) => [
'-e',
searchPattern,
]),
// FIX 3: POSIX end-of-options delimiter prevents argument/flag injection in file paths
'--',
...searchParts,
].filter(check.isTruthy);> [!NOTE]
> The patch is complete and addresses both command injection and secondary argument injection vectors. By invoking spawn('/usr/bin/grep', args) without a shell, arguments are passed directly to the operating system via execve(), preventing any shell metacharacter interpretation. Additionally, inserting the '--' end-of-options delimiter before searchParts ensures that target filenames beginning with a hyphen (-) cannot be misinterpreted by /usr/bin/grep as command-line flags. The patch also adds strict runtime schema validation (areGrepOptionsValid) and log redaction (redactGrepArgForLogging) when printCommand is enabled.
Exploiting CVE-2026-63496 requires an attacker to control the pattern string or patterns string array passed as the first argument (grepSearchPattern) to the grep() function. No special privileges are required within the application, nor do any non-default GrepOptions need to be active.
When the application invokes grep() with a malicious pattern containing $(...) or backticks, the payload is formatted into the -e "..." flag segment. Even if the caller enables fixedStrings: true (--fixed-strings), the shell evaluates the command substitution before /usr/bin/grep ever receives its arguments.
The following proof-of-concept demonstrates arbitrary command execution via the pattern property:
import { grep } from '@augment-vir/node';
async function runPoC() {
await grep(
{
// Bash evaluates $(id > /tmp/pwned) before invoking /usr/bin/grep
pattern: '$(id > /tmp/pwned)search_term',
},
{
file: './package.json',
}
);
}
runPoC();When runPoC() executes on a vulnerable version of @augment-vir/node, grep() constructs the following command string and passes it to bash -c:
grep --no-messages --with-filename --null -e "$(id > /tmp/pwned)search_term" "./package.json"The bash shell forks a subshell, executes id > /tmp/pwned, substitutes the empty stdout of that command into the argument (-e "search_term"), and finally executes grep. Because searchPatterns lacked even the basic escape() wrapper applied to file paths, an attacker can alternatively close the double quote directly (e.g., " ; id > /tmp/pwned #) to terminate the grep command and run arbitrary command pipelines.
Successful exploitation of CVE-2026-63496 grants the attacker arbitrary OS command execution with the privileges of the Node.js process running @augment-vir/node. Depending on how the library is deployed, an attacker can read sensitive application secrets and environment variables, modify or delete local files, pivot to internal network resources, or disrupt service availability.
The vulnerability is assigned a CVSS v3.1 base score of 7.8 (High) with the vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H:
@augment-vir/node is used locally, exploitation requires a user or local workflow to pass untrusted input into the search helper. However, if a downstream developer exposes grep() parameters through a network-accessible API or web interface, the effective risk escalates to unauthenticated remote command execution.grep().According to CISA's Stakeholder-Specific Vulnerability Categorization (SSVC), technical impact is rated as Total, exploitation status is Proof of Concept (PoC), and the flaw is not considered automatable out-of-the-box due to library-specific integration requirements. The FIRST EPSS score is 0.00184 (8.06th percentile), and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
To remediate CVE-2026-63496, upgrade @augment-vir/node (and any parent @augment-vir monorepo packages that depend on it) to version 31.73.5 or later. Version 31.73.5 replaces shell string execution with direct binary invocation via child_process.spawn('/usr/bin/grep', args).
Update the dependency in your project using npm:
npm install @augment-vir/node@^31.73.5After updating, verify that the resolved version in package-lock.json or yarn.lock is at least 31.73.5 by running npm list @augment-vir/node.
If an immediate upgrade is not feasible, downstream applications must enforce strict allowlist validation on all inputs passed to grepSearchPattern (pattern and patterns), grepSearchLocation (file, files, dir, dirs), and GrepOptions (include, exclude). Reject or strip all shell metacharacters—specifically $, `, ", ', \, ;, &, |, (, ), <, >, and newline characters—before invoking grep().
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
@augment-vir/node electrovir | < 31.73.5 | 31.73.5 |
| Attribute | Detail |
|---|---|
| Vulnerability ID | CVE-2026-63496 / GHSA-xvcc-vqjv-phqh |
| Weakness Class | CWE-78 (OS Command Injection) |
| Affected Component | @augment-vir/node (< 31.73.5) grep() function |
| CVSS v3.1 Score | 7.8 High (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) |
| EPSS Score | 0.184% (8.06th percentile) |
| Impact | Arbitrary OS Command Execution |
| Exploit Status | Proof-of-Concept (PoC) |
| CISA KEV Status | Not Listed |
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
CVE-2026-53998 is a critical format string injection vulnerability in Arize Phoenix affecting versions 13.0.0 prior to 15.7.0. The flaw resides in the applyChatTemplate GraphQL endpoint, which passes user-supplied template strings directly to Python's native str.format() method via FStringTemplateFormatter._format. Because attribute access is not restricted, an attacker can traverse Python dunder attributes (__class__, __init__, __globals__) to read arbitrary process memory and environment variables, including the PHOENIX_SECRET cryptographic key and third-party API credentials.
CVE-2026-63634 is an improper input validation vulnerability (CWE-20) in pympp, the official Python SDK for the Machine Payments Protocol (MPP) developed by tempoxyz. In versions prior to 0.9.1, servers acting as transaction fee payers validate incoming Ethereum Virtual Machine (EVM) transaction calldata using minimum-length thresholds rather than exact byte-length assertions. Because EVM smart contract dispatchers ignore trailing unparsed bytes while the protocol charges intrinsic gas for every byte in a transaction payload, an unauthenticated attacker can append thousands of non-zero padding bytes to legitimate payment requests. The server cosigns and broadcasts the oversized transaction, forcing the fee-payer wallet to expend inflated gas costs up to the policy limit and depleting its native token reserves.
CVE-2026-14265 (GHSA-c5q4-97jw-jggh) is a high-severity Remote Code Execution (RCE) vulnerability in the Amazon Web Services (AWS) Advanced JDBC Wrapper versions 3.3.0 through 4.0.0. The defect resides in the `RemoteQueryCachePlugin` and its underlying `CachedResultSet` implementation, which uses an unfiltered `java.io.ObjectInputStream` to deserialize cached SQL query results retrieved from external Redis or Valkey backends. An attacker with write access to the shared cache infrastructure can inject serialized Java gadget chains into cache keys, achieving arbitrary code execution within the JVM context of any application server consuming the cached entries.
CVE-2026-63672 is an open redirect and insecure Identity Provider (IdP) selection vulnerability in the SAML Single Sign-On (SSO) authentication module of EGroupware. In affected versions, the login method in api/src/Auth/Saml.php accepts an unauthenticated HTTP request parameter (idp) and passes it to the underlying SimpleSAMLphp library after only verifying that the string begins with https://. Because the input is not validated against the application's configured whitelist of trusted identity providers, an attacker can construct a malicious link that redirects authenticating users to an arbitrary, attacker-controlled SAML Identity Provider.
CVE-2026-62336 (GHSA-xhv5-8fpq-g7hf) is a high-severity local privilege escalation, arbitrary file overwrite, and denial-of-service vulnerability in qbee-agent, the client daemon for the qbee.io IoT device management platform. Prior to version 2026.27, the root-privileged agent failed to validate path components against symbolic links during directory creation and file opening operations in app/configuration/file_manager.go. Local unprivileged users can exploit this flaw by planting symlinks in user-controlled configuration paths or predictable temporary staging locations, causing the daemon to overwrite, truncate, or change ownership of sensitive root-owned system files.
CVE-2026-110782 is an authentication bypass and cryptographic signature verification failure in the SimpleSAMLphp SAML2 library (simplesamlphp/saml2). Resulting from an incomplete fix for CVE-2026-49283, the HTTP-Artifact binding implementation verifies the outer ArtifactResponse signature but unconditionally returns unsigned embedded SAML Responses without verifying signatures or validating that the embedded issuer matches the artifact issuer. In multi-IdP federation environments, an attacker controlling one trusted Identity Provider (IdP) can forge arbitrary identity assertions claiming to originate from another trusted IdP.