CVE-2026-104026 in Sapling SCMinfo

Summary

by MITRE • 10/02/2026

In Sapling SCM prior to v0.2.20260929-102736, control characters were allowed to be embedded in Git subtree URLs. A maliciously constructed repository, if cloned by a target, could trigger code execution on otherwise read-only actions such as sl log/blame/annotate.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/02/2026

The vulnerability identified in Sapling SCM prior version 0.2.20260929-102736 represents a critical security flaw rooted in the improper handling of control characters within Git subtree URLs. This issue arises from insufficient input validation and sanitization mechanisms when processing repository paths that are configured as subtrees. In standard Git workflows, subtree operations allow developers to incorporate code from other repositories into specific subdirectories of their project. However, Sapling SCM failed to adequately filter or escape special ASCII control characters embedded within these URL strings. This oversight creates a vector for injection attacks where malicious actors can manipulate the underlying command execution logic by embedding non-printable characters that alter how the system interprets and processes repository paths during read-only operations.

The technical mechanism of this vulnerability exploits the way Sapling SCM parses and executes commands associated with subtree URLs. When a user clones or interacts with a repository containing these malformed URLs, the application passes the unsanitized input directly to underlying shell commands or internal parsers without proper escaping. This allows an attacker to inject arbitrary control characters that can break out of expected string boundaries, effectively modifying the command structure. Because this flaw affects read-only actions such as sl log, sl blame, and sl annotate, it is particularly insidious. These operations are typically considered safe because they do not modify local state or push changes remotely. However, in this case, the injection allows for code execution even during these seemingly benign interactions, bypassing traditional assumptions about the safety of read-only commands in version control systems.

The operational impact of this vulnerability is severe, as it enables remote code execution on the client side without requiring any write privileges or interactive shell access from the victim. An attacker can craft a malicious repository that, when cloned by an unsuspecting developer using Sapling SCM, triggers arbitrary command execution upon viewing logs, blame information, or annotations related to files within those subtrees. This compromises the integrity and confidentiality of the target system, potentially leading to data exfiltration, installation of malware, or further lateral movement within a development environment. The fact that it affects read-only operations means that standard security practices relying on write-protection assumptions are rendered ineffective against this specific attack vector.

From an industry standards perspective, this vulnerability aligns with CWE-78 Improper Neutralization of Special Elements used in an OS Command, commonly known as OS Command Injection. It also relates to CWE-20 Improper Input Validation, as the application failed to restrict or sanitize input characters that could alter command semantics. In terms of the MITRE ATT&CK framework, this exploit maps to T1059 Command and Scripting Interpreter, specifically through indirect execution via a vulnerable client-side tool. The attack vector is classified under Remote Code Execution (RCE) facilitated by social engineering or supply chain compromise, where the victim voluntarily clones a malicious repository, trusting its contents while unknowingly executing attacker-controlled code during routine review activities.

Mitigation strategies for this vulnerability involve immediate upgrading to Sapling SCM version 0.2.20260929-102736 or later, which includes patches that enforce strict input validation and proper escaping of control characters in subtree URLs. Organizations should also implement network-level filtering to prevent cloning from untrusted sources until the patch is applied. Additionally, developers can adopt defensive coding practices by ensuring that all external inputs are validated against a whitelist of allowed characters before being processed by command interpreters. Security teams should monitor for unusual process executions originating from Sapling SCM binaries and review audit logs for signs of unauthorized command invocations during read-only operations to detect potential exploitation attempts in real-time.

Responsible

Meta

Reservation

10/01/2026

Disclosure

10/02/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!