Detect build-git-clone OS Command Injection via Repository URL (CVE-2026-137090) in IBM QRadar
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
QRadar Detection Query
-- df00tech DF00-22090c3415 · https://df00tech.com/detections/CVE-2026-137090 · licence: https://df00tech.com/detections/licence
SELECT QIDNAME(qid) AS event, "Process Name" AS process, "Parent Process Name" AS parent, "Process CommandLine" AS cmdline, sourceip, username, DATEFORMAT(starttime,'yyyy-MM-dd HH:mm:ss') AS time
FROM events
WHERE LOGSOURCETYPENAME(devicetype) IN ('Microsoft Windows Security Event Log','Linux OS')
AND (LOWER("Parent Process Name") LIKE '%node%' OR LOWER("Parent Process Name") LIKE '%npm%' OR LOWER("Parent Process CommandLine") LIKE '%build-git-clone%')
AND (LOWER("Process Name") LIKE '%sh' OR LOWER("Process Name") LIKE '%bash' OR LOWER("Process Name") LIKE '%cmd.exe' OR LOWER("Process Name") LIKE '%powershell.exe' OR LOWER("Process Name") LIKE '%git%')
AND ("Process CommandLine" LIKE '%;%' OR "Process CommandLine" LIKE '%|%' OR "Process CommandLine" LIKE '%`%' OR "Process CommandLine" LIKE '%$(%' OR "Process CommandLine" LIKE '%curl%' OR "Process CommandLine" LIKE '%wget%')
ORDER BY starttime DESC LAST 7 DAYS QRadar AQL selecting process-start events where a node/npm/build-git-clone parent spawns a shell or git child carrying shell metacharacters.
Data Sources
Required Tables
False Positives & Tuning
- CI/CD clone operations with special-character URLs
- Admin scripts chaining git with other commands
- Legitimate node-based deployment tooling
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.
- 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.
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
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.