Skip to content
CVE-2026-137090 Google Chronicle · YARA-L

Detect build-git-clone OS Command Injection via Repository URL (CVE-2026-137090) in Google Chronicle

Detects exploitation of CVE-2026-137090, an OS command injection vulnerability (CWE-78) in the build-git-clone npm package before version 1.0.4. The clone() function in src/index.ts concatenates an attacker-controllable repository URL into a sh -c shell command without sanitization. An attacker can embed shell metacharacters (for example ;, |, &, $(), or backticks) in the url argument to run arbitrary OS commands with the Node.js process privileges. Because build-git-clone wraps git clone, successful exploitation shows up as a node or git process spawning an unexpected child shell or command. This detection hunts for Node.js processes running build-git-clone that spawn git with suspicious URL arguments, and for git or shell children carrying injected metacharacters.

MITRE ATT&CK

Tactic
Initial Access Execution

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
// df00tech DF00-22090c3415 · https://df00tech.com/detections/CVE-2026-137090 · licence: https://df00tech.com/detections/licence
rule build_git_clone_cmd_injection_cve_2026_137090 {
  meta:
    author = "Argus Detection Platform"
    description = "OS command injection in build-git-clone <1.0.4 via repository URL (CVE-2026-137090)"
    severity = "CRITICAL"
  events:
    $e.metadata.event_type = "PROCESS_LAUNCH"
    (re.regex($e.principal.process.parent_process.file.full_path, `(?i)(node|npm|npx)`) or
     re.regex($e.principal.process.parent_process.command_line, `(?i)build-git-clone`))
    re.regex($e.target.process.file.full_path, `(?i)(sh|bash|dash|cmd\.exe|powershell\.exe|pwsh\.exe|git)$`)
    re.regex($e.target.process.command_line, `[;|\x60]|\$\(|&&|curl|wget`)
  condition:
    $e
}
critical severity medium confidence

Chronicle YARA-L rule matching process launches where a node/npm/build-git-clone parent spawns a shell or git child with shell metacharacters.

Data Sources

EDR process launch telemetrySysmon

Required Tables

PROCESS_LAUNCH

False Positives & Tuning

  • CI/CD clones with special-character URLs
  • Developer chained git commands
  • Legitimate node deployment wrappers

Other platforms for CVE-2026-137090


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Simulate build-git-clone command injection via semicolon in repo URL (Linux)

    Expected signal: Process-start event: node/sh parent spawning git and a secondary `id` command; command line contains a semicolon and a chained command.

  2. Test 2 Simulate command substitution injection in repo URL (Linux)

    Expected signal: Process-start event with a command line containing $() command substitution and a resulting touch/file-write.

  3. Test 3 Simulate injection via node wrapper on Windows

    Expected signal: Sysmon EventID 1 showing node.exe spawning cmd.exe/git.exe with an ampersand-chained command line.


Response Playbook

Triage

  1. Identify the host and user context of the alert and confirm whether build-git-clone (npm package < 1.0.4) is installed in the project (check package.json / package-lock.json / node_modules/build-git-clone/package.json).
  2. Extract the full repository URL argument passed to the clone() call and inspect it for shell metacharacters (;, |, &, $(), backticks), a benign URL will contain none.
  3. Determine the parent node/npm process, the exact child command spawned, and whether that child performed network egress, file writes, or spawned further processes.
  4. Correlate the event timestamp with the source of the repository URL (user input, API request, webhook, config file) to establish how the malicious value was introduced.

Containment

  1. Isolate the affected host from the network if an injected command executed, to prevent lateral movement or data exfiltration.
  2. Kill the offending node/git/shell process tree and revoke any credentials or tokens that were accessible to the process (e.g. git credentials, CI secrets, cloud instance metadata).
  3. Block or remove the build-git-clone <1.0.4 package and pin to 1.0.4 or later across affected repositories.

Evidence Collection

  1. Capture the full process tree (parent command line, child command line, grandchildren) and preserve EDR/Sysmon process-start records for the incident window.
  2. Collect the repository URL value and the application log / request that supplied it, plus any files written or network connections made by the injected command.

Escalation Criteria

  • !Escalate to incident response if the injected command achieved code execution, established persistence, or exfiltrated data or credentials.
  • !Escalate if the malicious repository URL originated from an untrusted or externally-reachable input path, indicating active exploitation rather than internal misuse.

Investigation Guide

Forensic Artifacts

  • >Process-start records (Sysmon EventID 1 / EDR ProcessRollup2) showing node/npm spawning a shell or git child with metacharacter-laden arguments.
  • >Application logs or request records containing the attacker-supplied repository URL.
  • >node_modules/build-git-clone version metadata and shell history / command output left by the injected payload.

Tuning Guidance

Baseline legitimate CI/CD and developer clone activity first, many build pipelines pass URLs containing query strings or credentials that include special characters. Tighten the metacharacter set to high-signal injection markers (;, $(, backticks, &&) and whitelist known-good runner hosts and repository URL patterns. Where possible, pin detection to hosts/projects that actually consume build-git-clone to reduce noise.


Hunting Queries

Hunt for node processes spawning git-related commands that contain shell metacharacters, indicating potential clone() injection.

Hunting — KQL
kql
// df00tech DF00-22090c3415 · https://df00tech.com/detections/CVE-2026-137090 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in~ ("node","node.exe") | where ProcessCommandLine has "git" and ProcessCommandLine has_any (";","|","$(","`","&&") | project Timestamp, DeviceName, InitiatingProcessCommandLine, ProcessCommandLine
Hunting — SPL
spl
``` df00tech DF00-22090c3415 · https://df00tech.com/detections/CVE-2026-137090 · licence: https://df00tech.com/detections/licence ```
index=* sourcetype=Sysmon EventCode=1 ParentImage=*node* CommandLine=*git* | regex CommandLine="[;|`]|\$\(|&&" | table _time host ParentCommandLine CommandLine

Atomic Red Team Tests

Test 1 Simulate build-git-clone command injection via semicolon in repo URL (Linux)
linux

Mimics the vulnerable clone() behaviour by passing an unsanitized repository URL containing a shell separator into a git clone shell invocation.

Command

bash
sh -c "git clone 'https://example.com/repo.git; id > /tmp/bgc_poc.txt'" ; cat /tmp/bgc_poc.txt

Cleanup

bash
rm -f /tmp/bgc_poc.txt

Expected Telemetry

Process-start event: node/sh parent spawning git and a secondary `id` command; command line contains a semicolon and a chained command.

Expected Detection

KQL/SPL/EQL rules match on shell metacharacters in a git/shell child of a node or shell parent.

Test 2 Simulate command substitution injection in repo URL (Linux)
linux

Exercises command-substitution injection via $() embedded in the repository URL argument.

Command

bash
sh -c 'git clone "https://example.com/repo.git$(touch /tmp/bgc_subst.txt)"' ; ls -l /tmp/bgc_subst.txt

Cleanup

bash
rm -f /tmp/bgc_subst.txt

Expected Telemetry

Process-start event with a command line containing $() command substitution and a resulting touch/file-write.

Expected Detection

Detection matches on the $( metacharacter in the git clone command line.

Test 3 Simulate injection via node wrapper on Windows
windows

Runs a node one-liner that shells out to git clone with an attacker-controlled URL containing shell operators, approximating the vulnerable wrapper on Windows.

Command

powershell
node -e "require('child_process').execSync('git clone https://example.com/repo.git & echo bgc_poc > %TEMP%\\bgc_poc.txt')"

Cleanup

powershell
del /q %TEMP%\bgc_poc.txt

Expected Telemetry

Sysmon EventID 1 showing node.exe spawning cmd.exe/git.exe with an ampersand-chained command line.

Expected Detection

KQL/EQL/CQL rules match on the node-parent git/cmd child with shell metacharacters.

Related Detections