Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104026 Overview
CVE-2026-104026 affects Sapling SCM versions prior to v0.2.20260929-102736. The vulnerability allows control characters to be embedded within Git subtree URLs. A maliciously crafted repository can trigger code execution when a target user clones it and runs read-only commands such as sl log, sl blame, or sl annotate. The flaw is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences.
Critical Impact
Read-only operations on an untrusted repository can execute attacker-controlled code on the local machine, breaking the long-standing assumption that inspection commands are safe.
Affected Products
- Sapling SCM versions prior to v0.2.20260929-102736
- Any workflow that clones untrusted repositories with Sapling
- Automated tooling that invokes sl log, sl blame, or sl annotate on third-party repositories
Discovery Timeline
- 2026-10-02 - CVE-2026-104026 published to NVD
- 2026-10-02 - Last updated in NVD database
Technical Details for CVE-2026-104026
Vulnerability Analysis
Sapling SCM is Meta's source control client, supporting Git-compatible workflows including subtree operations. The vulnerability stems from improper neutralization of control characters inside Git subtree URLs stored in repository metadata. When Sapling parses these URLs during routine inspection commands, embedded control sequences are interpreted rather than sanitized.
This allows attackers to smuggle executable payloads through fields that users and tooling treat as inert data. The attack surface is particularly concerning because commands like sl log, sl blame, and sl annotate are widely assumed to be read-only. Developers routinely run them against freshly cloned repositories without security review.
Root Cause
The root cause is missing sanitization of control characters in Git subtree URL fields. Sapling accepted and processed these characters when expanding or dispatching subtree metadata, enabling command interpretation to escape the intended parsing context. This maps directly to [CWE-150], where downstream components treat crafted sequences as instructions rather than data.
Attack Vector
An attacker publishes a repository containing a Git subtree URL with embedded control characters. The target clones the repository using Sapling. When the target runs any affected inspection command, the control sequences trigger code execution in the user's local context. User interaction is required to clone and run the command, but no privileges or network access beyond the clone are needed. See the Facebook Security Advisory CVE-2026-104026 for additional technical context.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-104026
Indicators of Compromise
- Unexpected child processes spawned by the sl binary during routine log, blame, or annotate operations.
- Git subtree URL fields in repository metadata containing non-printable or control characters such as \\x1b, \n, or \r.
- Outbound network connections initiated shortly after cloning a third-party repository.
Detection Strategies
- Scan repository metadata and configuration for control characters in subtree URL fields before invoking Sapling commands.
- Monitor process-tree telemetry for shell interpreters or scripting engines launched as children of sl.
- Correlate repository clone events with subsequent anomalous process creation or file writes under user profiles.
Monitoring Recommendations
- Enable endpoint telemetry on developer workstations and CI runners that execute Sapling commands.
- Alert on execution of sl log, sl blame, or sl annotate against repositories from untrusted sources.
- Log and review Sapling version strings across the fleet to identify hosts running vulnerable builds.
How to Mitigate CVE-2026-104026
Immediate Actions Required
- Upgrade Sapling SCM to version v0.2.20260929-102736 or later on all developer workstations and build systems.
- Audit CI/CD pipelines and automation that clone untrusted repositories with Sapling and run inspection commands.
- Inventory existing clones for suspicious subtree URL entries containing control characters.
Patch Information
Upgrade to Sapling SCM v0.2.20260929-102736 or later. The fix sanitizes control characters in Git subtree URLs so that inspection commands no longer process them as executable sequences. Refer to the Facebook Security Advisory CVE-2026-104026 for release details.
Workarounds
- Avoid cloning untrusted repositories with Sapling until the patched version is deployed.
- Restrict Sapling execution to vetted repositories by enforcing allowlists in CI configuration.
- Review subtree URL fields in repository metadata and reject any that contain non-printable characters.
# Verify installed Sapling version meets the patched release
sl --version
# Scan a repository for control characters in subtree URL metadata
grep -rP '[\\x00-\\x1f]' .sl/ .gitmodules 2>/dev/null
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

