Oct 6, 2026·5 min read·38 visits
Omission of the VISUAL environment variable from the GitEnvKeys lookup registry allows an attacker-controlled VISUAL variable to bypass simple-git security checks, leading to arbitrary command execution when Git falls back to an interactive editor.
A critical security control bypass vulnerability exists in @simple-git/argv-parser before version 2.0.1. The package fails to map the VISUAL environment variable to the allowUnsafeEditor rule, allowing attackers who control environment parameters to execute arbitrary commands when Git triggers an interactive editor fallback.
The Node.js library simple-git provides a fluent interface for executing Git commands within Node.js applications. To maintain system security, the underlying argument parser @simple-git/argv-parser implements strict sanitization routines. These routines filter ambient and user-supplied environment variables to prevent command injection and unauthorized execution of binary files.
By default, interactive operations such as commit amendments or interactive rebases spawn a terminal-based text editor. To prevent malicious commands from being executed during this transition, the library checks relevant environment variables against the allowUnsafeEditor configuration. If allowUnsafeEditor is false, unsafe editor values are neutralized or blocked.
However, a critical vulnerability arose because the registry of tracked environment variables omitted the standard VISUAL variable. This omission allowed the environment variable to pass through the validation layer without validation. If an application forwards attacker-controlled environment variables to simple-git, an attacker can achieve arbitrary remote code execution.
The vulnerability exists due to an incomplete blocklist/allowlist structure within the file packages/argv-parser/src/env/parse-env.ts. The implementation maintains a registry named GitEnvKeys that maps environment variables to security restriction categories such as allowUnsafeEditor or allowUnsafePager. This mapping determines which variables must undergo security checks before command execution.
Git relies on a specific sequence of fallbacks to launch an interactive editor. It checks GIT_EDITOR first, followed by the git configuration core.editor, then VISUAL, and finally EDITOR. While GIT_EDITOR and EDITOR were mapped to allowUnsafeEditor in the package's configuration, the VISUAL variable was completely omitted from the list.
When a child process is spawned, simple-git constructs the runtime environment using prepareEnv. This function cleans the environment by stripping variables that do not start with a git prefix or are not explicitly defined in the GitEnvKeys dictionary. Because visual was absent from GitEnvKeys, the parser did not check its contents against the security rules. The variable was propagated to the spawned Git process unmodified, allowing the bypass of allowUnsafeEditor restrictions.
The root of the flaw is found in the definition of GitEnvKeys. Before the patch was applied, the mapping array registered keys representing editors and pagers, but completely missed the visual variable. This meant any security policy configured for safe editor execution was ineffective against payloads supplied through the VISUAL environment variable.
Below is the comparison of the vulnerable and patched code states in packages/argv-parser/src/env/parse-env.ts:
// Vulnerable Code State
const GitEnvKeys = {
'editor': 'allowUnsafeEditor',
'git_editor': 'allowUnsafeEditor',
'git_sequence_editor': 'allowUnsafeEditor',
'pager': 'allowUnsafePager',
'prefix': 'allowUnsafeConfigPaths',
'ssh_askpass': 'allowUnsafeAskPass',
} as const satisfies Record<string, VulnerabilityCategory>;The corresponding patch explicitly registers visual to map to the allowUnsafeEditor category:
// Patched Code State
const GitEnvKeys = {
'editor': 'allowUnsafeEditor',
'git_editor': 'allowUnsafeEditor',
'git_sequence_editor': 'allowUnsafeEditor',
'pager': 'allowUnsafePager',
'prefix': 'allowUnsafeConfigPaths',
'ssh_askpass': 'allowUnsafeAskPass',
'visual': 'allowUnsafeEditor', // Fix: Maps VISUAL to the editor safety category
} as const satisfies Record<string, VulnerabilityCategory>;This simple addition ensures that whenever a command block contains the VISUAL variable, the input value is subjected to validation against unsafe shell patterns and command segments.
An exploit targeting this vulnerability requires that a Node.js application accept user-influenced properties or environment variables and forward them to a simple-git instance. This occurs frequently in applications that accept external configuration blocks, environment payloads, or dynamically generated execution parameters.
To trigger the vulnerability, the attacker passes the VISUAL variable mapped to a malicious command sequence, such as a shell command downloader or a local payload writer. The application must also trigger an operation that requires Git to launch an interactive editor. Common interactive actions include running git commit --amend or initiation of an interactive rebase.
When the Git child process is invoked, it evaluates the environment. Finding that GIT_EDITOR is unset and the git config does not restrict it, Git accesses VISUAL and executes the command string directly in the shell. The execution takes place with the OS-level permissions of the running Node.js application process.
The consequence of this flaw is remote command execution under the privileges of the Node.js process. In cloud or containerized environments, this can lead to total system compromise, credential exfiltration from local environments, and lateral movement within the network.
According to CVSS v4.0 metrics, this vulnerability is scored at 9.2 (Critical). The high score reflects the potential for unauthenticated remote code execution, although the attack complexity is classified as high due to the requirement for specific application behaviors that forward untrusted environment variables.
Because the vulnerability exists in a core helper dependency of simple-git, its reach extends to any downstream application that relies on simple-git for managing git operations with user-supplied environment configurations. Security teams must identify and patch all instances immediately to mitigate risks.
The primary remediation strategy is upgrading the @simple-git/argv-parser package to version 2.0.1 or later. Alternatively, updating the consuming library simple-git to its latest version will pull in the resolved dependency automatically. This closes the control bypass by ensuring VISUAL is systematically checked.
If patching is not immediately feasible, developers must implement strict validation on environment variables passed to simple-git APIs. Manually deleting keys like VISUAL, EDITOR, and GIT_EDITOR from custom environment blocks before passing them to the .env() chain prevents injection vectors.
Additionally, applications can explicitly define a safe, static global variable for GIT_EDITOR (e.g., GIT_EDITOR=true or /usr/bin/true) in the environment or Git configuration. Because Git evaluates GIT_EDITOR before VISUAL, this blocks Git from ever falling back to the unvalidated VISUAL variable, rendering the bypass ineffective.
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@simple-git/argv-parser simple-git | < 2.0.1 | 2.0.1 |
simple-git simple-git | < 4.0.2 | 4.0.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-78 / CWE-184 |
| Attack Vector | Network |
| CVSS v4.0 Score | 9.2 (Critical) |
| EPSS Score | 0.00275 (Percentile: 18.07%) |
| Impact | Unauthenticated Remote Code Execution |
| Exploit Status | Proof of Concept |
| KEV Status | Not Listed |
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') and Incomplete List of Disallowed Inputs
A pre-authentication path traversal vulnerability exists in Etherpad versions 1.8.14 prior to 3.3.3 within the `/static/*` plugin asset handler. In `src/node/utils/Minify.ts`, an unconditional backslash-to-forward-slash conversion is executed after pathname sanitization has already concluded. On POSIX systems, this transforms benign backslash characters into directory traversal sequences (`../`), allowing unauthenticated remote attackers to read arbitrary files from the host filesystem, extract administrative credentials from `settings.json`, and achieve remote code execution via the plugin installation interface.
A local sandbox escape vulnerability exists in the Natural Language Toolkit (NLTK) versions 3.9.4 through 3.10.3 within its ZIP archive extraction implementation. Due to a type mismatch in member resolution and a failure to inspect filesystem link counts (st_nlink > 1), the extraction routine follows pre-planted hardlinks inside the extraction root, allowing a local attacker to truncate and overwrite arbitrary out-of-root files writable by the executing process.
CVE-2026-129304 is an improper input validation and Redis glob pattern injection vulnerability in Guard Core versions 1.0.0 through 3.12.0. The header parsing routine _extract_from_forwarded_header() extracts values from the X-Forwarded-For HTTP header without verifying that the extracted substring is a valid IPv4 or IPv6 address. In deployments configured with trusted_proxies where the target header index is client-controllable, arbitrary strings containing Redis glob metacharacters reach BehaviorTracker and are interpolated directly into Redis key names and blocking KEYS queries. This allows unauthenticated attackers to aggregate cross-client behavioral metrics, trigger false-positive rate limits, cause denial of service via O(N) Redis keyspace scans, or raise unhandled ValueError exceptions during automated IP ban operations.
iSponsorBlockTV prior to version 2.11.0 contains a blind Server-Side Request Forgery (SSRF) vulnerability in its Simple Service Discovery Protocol (SSDP) and Discovery and Launch (DIAL) client implementation. During local device discovery, the application processes SSDP responses without validating that the URL specified in the LOCATION header or the subsequent application-url response header matches the IP address of the responding UDP host. An adjacent network attacker can spoof SSDP responses to induce the iSponsorBlockTV host to send arbitrary HTTP GET requests and constrained HTTP POST requests to internal network endpoints or loopback services.
CVE-2026-121707 is a high-severity Regular Expression Denial of Service (ReDoS) vulnerability in the Effect TypeScript library prior to version 3.22.1. When evaluating untrusted input against Schema.TemplateLiteral definitions containing multiple string spans, the dynamically compiled regular expression exhibits polynomial backtracking complexity. Because JavaScript runtimes execute on a single-threaded event loop, processing specially crafted non-matching strings causes synchronous CPU starvation and complete application unresponsiveness.
CVE-2026-75518 is an incorrect authorization and privilege assignment vulnerability in the DOMShell Model Context Protocol (MCP) server (@apireno/domshell) prior to version 2.0.8. The server classified the domshell_eval tool and the eval command as read-tier operations, permitting their execution without the --allow-write flag. Because the eval command dispatches through the same Chrome DevTools Protocol (CDP) Runtime.evaluate pipeline as the write-tier js command without enabling the throwOnSideEffect constraint, callers restricted to read-only sessions can execute state-mutating JavaScript in the browser context while host user interfaces and audit logs record the activity as read-only.