CVE-2026-137090 in build-git-cloneinfo

Summary

by MITRE • 11/25/2026

build-git-clone before 1.0.4 contains an OS command injection vulnerability in the clone() function that allows attackers to execute commands by supplying crafted repository URLs. Attackers can embed shell metacharacters such as ; or $() in the url argument, which is concatenated into a sh -c command, to execute operating system commands with Node.js process privileges.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability identified in build-git-clone versions prior to 1.0.4 represents a critical OS Command Injection flaw located within the clone function of the library. This security defect arises from improper neutralization of special elements used in an operating system command, commonly categorized under CWE-78: Improper Neutralization of Special Elements used in an OS Command. The core issue stems from how the application constructs shell commands by directly concatenating user-supplied input into a string that is subsequently passed to sh -c for execution. When developers utilize this library to clone Git repositories, they often pass repository URLs as arguments. In vulnerable versions, these URLs are not sanitized or validated against expected patterns before being embedded into system-level command strings. This lack of rigorous input validation allows malicious actors to inject arbitrary shell metacharacters such as semicolons (;) or subshell execution operators ($()) directly into the url argument.

From an operational perspective, this vulnerability enables remote code execution with the privileges of the Node.js process running the application. If a server-side component uses build-git-clone to clone repositories based on user-provided URLs, an attacker can craft a malicious URL that terminates the intended git command and appends additional commands. For instance, by supplying a URL like https://example.com/repo.git; rm -rf /, the shell interprets this as two separate commands: first cloning the repository (or failing if it does not exist) and then executing the destructive removal of files. More sophisticated attacks could involve reverse shells or data exfiltration scripts embedded within the $() syntax, allowing full control over the underlying operating system. This aligns with MITRE ATT&CK technique T1059: Command and Scripting Interpreter, specifically sub-techniques related to Unix shell commands, as it leverages standard command-line interfaces to execute unauthorized operations.

The impact of this vulnerability is severe, particularly in environments where build-git-clone is used for automated builds, CI/CD pipelines, or server-side repository management. An attacker who successfully exploits this flaw can compromise the integrity and confidentiality of the host system. Depending on the security context of the Node.js process, this could lead to full system takeover, access to sensitive configuration files, database credentials stored in environment variables, or lateral movement within a networked infrastructure. In cloud-native environments where containers are often run with elevated privileges for build purposes, the blast radius can extend beyond the immediate container to affect shared host resources or other co-located workloads.

Mitigation strategies must focus on preventing the execution of unintended commands through strict input validation and secure coding practices. The primary remediation is to upgrade build-git-clone to version 1.0.4 or later, where this vulnerability has been addressed by implementing proper sanitization mechanisms that strip or escape dangerous shell metacharacters before command construction. For applications unable to immediately update the library, developers should implement a whitelist approach for repository URLs, ensuring they match expected patterns such as standard HTTPS Git URL formats without allowing arbitrary characters like semicolons, pipes, or backticks. Additionally, avoiding the use of sh -c with concatenated user input is recommended; instead, using language-native APIs that execute commands directly via arrays (e.g., execFile in Node.js) prevents shell interpretation entirely and eliminates this class of vulnerability at the code level.

Responsible

VulnCheck

Reservation

11/25/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.02309

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!