Skip to main content
VulnerabilityPublished

CVE-2026-114145: Legit · GitPython validates a submodule's ".git" path only after cloning into it (RCE)

Affects legitSource GCVE Database

0
Authoritative record:CVE-2026-114145· High 7.5

Not known to be exploited · CVSS 7.5 High : upgrade to 1.2.0.post0_17 soon.

Data as of 26 Oct 2026, 19:12 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 1.2.0.post0_17
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 Oct 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade legit to 1.2.0.post0_17.

Affected software

ProductAffectedFixed in
Homebrewlegitpkg:brew/legitOther threatsAffected
  • >=0.1.0 <1.2.0.post0_17
Fixed in
  • 1.2.0.post0_17

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in Legit version 1.2.0.post0_17 and later. Users should upgrade to this version or newer to ensure that path validation occurs before any cloning and that malicious hooks cannot be planted. Until upgraded, avoid passing untrusted input to create_submodule's path parameter. Note that in versions 3.2.0 and later, although a ValueError is raised for invalid paths, the malicious hook file is still created and not removed, so relying on catching this error is insufficient mitigation.

Description

A vulnerability in Legit's create_submodule function allows an attacker to plant an executable Git hook by specifying a submodule path of ".git/hooks". The path validation occurs only after the submodule is cloned, resulting in an attacker-controlled executable hook file that runs on subsequent Git operations. Versions 3.1.x silently allow this, while 3.2.0+ raise a ValueError after cloning but do not remove the planted hook, enabling code execution.

References

Community reviews

Loading reviews…