build-git-clone OS Command Injection via Repository URL (CVE-2026-137090)
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.
Vulnerability Intelligence
TheoreticalWeakness (CWE)
Timeline
- Disclosed
- November 25, 2026
References & Proof of Concept
- https://github.com/emanuelmoraes-dev/build-git-clone/blob/68bc305028d04c9a71a030c4b0b5cc36450201b9/src/index.ts#L77
- https://github.com/emanuelmoraes-dev/build-git-clone/commit/3d55e64e5b7c61e560b5d030d6a918cad5c67a29
- https://github.com/emanuelmoraes-dev/build-git-clone/pull/1
- https://www.vulncheck.com/advisories/build-git-clone-before-1.0.4-os-command-injection-in-clone-via-repository-url
CVSS
What is CVE-2026-137090 build-git-clone OS Command Injection via Repository URL (CVE-2026-137090)?
build-git-clone OS Command Injection via Repository URL (CVE-2026-137090) (CVE-2026-137090) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for build-git-clone OS Command Injection via Repository URL (CVE-2026-137090), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, DeviceProcessEvents. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// df00tech DF00-22090c3415 · https://df00tech.com/detections/CVE-2026-137090 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents
| where Timestamp > ago(7d)
| where (InitiatingProcessFileName in~ ("node", "node.exe", "npm", "npm.cmd", "npx", "npx.cmd") or InitiatingProcessCommandLine has "build-git-clone")
| where FileName in~ ("sh", "bash", "dash", "cmd.exe", "powershell.exe", "pwsh.exe", "git", "git.exe")
| where ProcessCommandLine has_any (";", "|", "&", "$(", "`", "&&", "||", ">", "curl", "wget", "bash -c", "sh -c")
| where not(ProcessCommandLine matches regex @"(?i)^\s*git(\.exe)?\s+clone\s+(--[a-z-]+\s+)*https?://[^\s;&|`$]+\s*$")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, FolderPath
| order by Timestamp desc Finds Node/npm processes (or any process invoking build-git-clone) that spawn a shell or git process whose command line contains shell metacharacters, excluding well-formed git clone <https-url> invocations.
Data Sources
Required Tables
False Positives
- Legitimate CI/CD pipelines that clone repositories with URLs containing query strings or credentials with special characters
- Developer tooling that chains git clone with other commands using shell operators
- Automation scripts that intentionally pass compound commands to node wrappers
Query fingerprint DF00-22090c3415 · licence
Sigma logsource & community rules
The detection logic for build-git-clone OS Command Injection via Repository URL (CVE-2026-137090) (CVE-2026-137090) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-137090
References (4)
- https://github.com/emanuelmoraes-dev/build-git-clone/blob/68bc305028d04c9a71a030c4b0b5cc36450201b9/src/index.ts#L77
- https://github.com/emanuelmoraes-dev/build-git-clone/commit/3d55e64e5b7c61e560b5d030d6a918cad5c67a29
- https://github.com/emanuelmoraes-dev/build-git-clone/pull/1
- https://www.vulncheck.com/advisories/build-git-clone-before-1.0.4-os-command-injection-in-clone-via-repository-url
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.
- 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.
- 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.
- 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
- 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).
- Extract the full repository URL argument passed to the clone() call and inspect it for shell metacharacters (;, |, &, $(), backticks), a benign URL will contain none.
- Determine the parent node/npm process, the exact child command spawned, and whether that child performed network egress, file writes, or spawned further processes.
- 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
- Isolate the affected host from the network if an injected command executed, to prevent lateral movement or data exfiltration.
- 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).
- Block or remove the build-git-clone <1.0.4 package and pin to 1.0.4 or later across affected repositories.
Evidence Collection
- Capture the full process tree (parent command line, child command line, grandchildren) and preserve EDR/Sysmon process-start records for the incident window.
- 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.
// 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 ``` 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
Mimics the vulnerable clone() behaviour by passing an unsanitized repository URL containing a shell separator into a git clone shell invocation.
Command
sh -c "git clone 'https://example.com/repo.git; id > /tmp/bgc_poc.txt'" ; cat /tmp/bgc_poc.txt Cleanup
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.
Exercises command-substitution injection via $() embedded in the repository URL argument.
Command
sh -c 'git clone "https://example.com/repo.git$(touch /tmp/bgc_subst.txt)"' ; ls -l /tmp/bgc_subst.txt Cleanup
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.
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
node -e "require('child_process').execSync('git clone https://example.com/repo.git & echo bgc_poc > %TEMP%\\bgc_poc.txt')" Cleanup
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
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040