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 vialfs.customtransfer.lfs-standalone-file.pathandlfs.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
.gitmodulesand.git/configfiles in existing repository checkouts for multi-linesubmodule.<name>.urlvalues containinglfs.customtransferorlfs.extension.
Remediation Steps:
- Verify the currently installed version of Git LFS by running
git lfs version. - Upgrade the
git-lfspackage 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, orzypper patch). - On Windows systems using Git for Windows, install Git for Windows v2.56.0.windows.3 or newer.
- Audit existing local repositories by executing
git config -l -zand verifying that nosubmodule.*.urlvalue contains multiple newline characters or references tolfs.directives.
References
- GitHub Security Advisory GHSA-xrgv-7vx6-5vx6
- Git LFS Fix Commit 39b73aa4db821fea6f0da8320128e5e1b919942d
- Git LFS Fix Commit 1b2672aaa29016e8004369df1406d2a73057f45f
- Git LFS v3.8.1 Release
- NVD - CVE-2026-105802
- CVE.org Record - CVE-2026-105802
- CVE List V5 JSON Record - CVE-2026-105802
- Wiz Vulnerability Database - CVE-2026-105802
- Git for Windows v2.56.0.windows.3 Release
- openSUSE Security Announce - git-lfs
- FreeBSD Ports - devel/git-lfs 3.8.1
Read the full report for CVE-2026-105802 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.