Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

CVE-2026-105802: CVE-2026-105802: Arbitrary Command Execution via Submodule Configuration Injection in Git LFS

CVE-2026-105802: Arbitrary Command Execution via Submodule Configuration Injection in Git LFS Vulnerability ID: CVE-2026-105802 CVSS Score: 8.6 Published: 2026-11-20 A line delimiter injection vulnerability in Git L

CVE-2026-105802: Arbitrary Command Execution via Submodule Configuration Injection in Git LFS

Vulnerability ID: CVE-2026-105802
CVSS Score: 8.6
Published: 2026-11-20

A line delimiter injection vulnerability in Git Large File Storage (Git LFS) versions 0.6.0 through 3.8.0 allows remote attackers to execute arbitrary commands via crafted Git submodule URLs containing embedded line feed characters.

TL;DR

Git LFS prior to 3.8.1 parses git config -l output by splitting on newline characters (\n). Because Git permits embedded newlines in configuration values such as submodule.<name>.url, a malicious .gitmodules file can inject arbitrary local repository configuration keys when git submodule init is executed. Attackers can override lfs.customtransfer.<name>.path or lfs.extension.<name>.clean to execute arbitrary binaries shipped inside the repository.

⚠️ Exploit Status: POC

Technical Details

  • Vulnerability Type: Line Delimiter / Configuration Injection (CWE-144)
  • Affected Component: Git LFS Configuration Parser (git/config.go)
  • Attack Vector: Network / Crafted .gitmodules Submodule URL
  • CVSS v4.0 Score: 8.6 High (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N)
  • EPSS Score: 0.53% (45.61st Percentile)
  • Impact: Arbitrary Local Command Execution
  • Exploit Status: Proof-of-Concept in Official Test Suite
  • CISA KEV Status: Not Listed

Affected Systems

  • Git Large File Storage (git-lfs) >= 0.6.0, < 3.8.1
  • Git for Windows < v2.56.0.windows.3
  • Linux / BSD distributions packaging git-lfs < 3.8.1 (Alpine, Debian, Ubuntu, RHEL, openSUSE, FreeBSD)
  • git-lfs: >= 0.6.0, < 3.8.1 (Fixed in: 3.8.1)

Code Analysis

Commit: 39b73aa

Use null-delimited git config -l -z output in ParseConfigEntries to prevent line delimiter injection via submodule URLs.

File: git/config.go
@@ -50,15 +50,15 @@ func NewReadOnlyConfig(workdir, gitdir string) *Configuration {
 }

 func ParseConfigEntries(config string, onlySafeKeys bool) *ConfigurationSource {
-   entries := strings.Split(config, "\n")
+   entries := strings.Split(config, "\x00")

    source := &ConfigurationSource{
        Entries:      make([]ConfigurationEntry, 0, len(entries)),
        OnlySafeKeys: onlySafeKeys,
    }

    for _, e := range entries {
-       fields := strings.SplitN(e, "=", 2)
+       fields := strings.SplitN(e, "\n", 2)

        if len(fields) < 2 {
            continue
@@ -212,23 +212,23 @@ func (c *Configuration) FileSource(filename string) (*ConfigurationSource, error
        return nil, err
    }

-   out, err := c.gitConfig("-l", "-f", filename)
+   out, err := c.gitConfig("-l", "-z", "-f", filename)
    if err != nil {
        return nil, err
    }
    return ParseConfigEntries(out, true), nil
 }

 func (c *Configuration) RevisionSource(revision string) (*ConfigurationSource, error) {
-   out, err := c.gitConfig("-l", "--blob", revision)
+   out, err := c.gitConfig("-l", "-z", "--blob", revision)
    if err != nil {
        return nil, err
    }
    return ParseConfigEntries(out, true), nil
 }

 func (c *Configuration) Source() (*ConfigurationSource, error) {
-   out, err := c.gitConfig("-l")
+   out, err := c.gitConfig("-l", "-z")
    if err != nil {
        return nil, err
    }

Commit: 1b2672a

Additional configuration parsing hardening and release preparation for CVE-2026-105802.

Exploit Details

  • GitHub (Official Git LFS Test Suite): End-to-end regression test (t/t-submodule-lfsconfig.sh) demonstrating configuration injection and executable invocation via lfs.customtransfer.lfs-standalone-file.path and lfs.extension.<name>.clean.

Mitigation Strategies

  • Upgrade Git LFS to version 3.8.1 or newer across all developer workstations and CI/CD build agents.
  • Update bundled Git distributions, such as Git for Windows (to v2.56.0.windows.3 or later), that package Git LFS.
  • Restrict automated CI/CD pipelines from automatically initializing Git submodules on untrusted repositories or unverified external pull requests.
  • Audit .gitmodules and .git/config files in existing repository checkouts for multi-line submodule.<name>.url values containing lfs.customtransfer or lfs.extension.

Remediation Steps:

  1. Verify the currently installed version of Git LFS by running git lfs version.
  2. Upgrade the git-lfs package to 3.8.1 or later using the system package manager (brew upgrade git-lfs, apt-get update && apt-get install --only-upgrade git-lfs, dnf upgrade git-lfs, or zypper patch).
  3. On Windows systems using Git for Windows, install Git for Windows v2.56.0.windows.3 or newer.
  4. Audit existing local repositories by executing git config -l -z and verifying that no submodule.*.url value contains multiple newline characters or references to lfs. directives.

References

Read the full report for CVE-2026-105802 on our website for more details including interactive diagrams and full exploit analysis.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.