Description
In Git before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4, and 2.17.x before 2.17.1, remote code execution can occur. With a crafted .gitmodules file, a malicious project can execute an arbitrary script on a machine that runs "git clone --recurse-submodules" because submodule "names" are obtained from this file, and then appended to $GIT_DIR/modules, leading to directory traversal with "../" in a name. Finally, post-checkout hooks from a submodule are executed, bypassing the intended design in which hooks are not obtained from a remote server.
In plain language
AI Worth attentionIf you use Git on systems running older Git versions, a malicious project could run code on your machine when someone clones it with submodules enabled—but this is not a risk in normal browsing and requires a specific clone action.
CVE-2018-11235 is an unauthenticated local code execution issue in Git caused by path handling in submodule processing (via a crafted .gitmodules file) that can lead to unintended hook execution when cloning with --recurse-submodules.
What to do now
- Check the installed Git version on any systems that run or perform “git clone --recurse-submodules”.
- Identify whether any employees/scripts clone untrusted repositories with submodules enabled (look for the --recurse-submodules option in documentation, scripts, CI jobs, and command histories).
- Upgrade Git to a fixed version: update to 2.17.1 or later (this also covers the affected older lines listed for 2.13.7, 2.14.4, 2.15.2, and 2.16.4).
- If you cannot upgrade immediately, stop cloning untrusted repos with --recurse-submodules and review/limit which repositories are allowed to be cloned from.
CVSS Vector Breakdown
AV:LAttack VectorAC:LAttack ComplexityPR:NPrivileges RequiredUI:RUser InteractionS:UScopeC:HConfidentialityI:HIntegrityA:HAvailabilityWeaknesses
Affected Products
Exploitability
Exploit details including PoC links, Metasploit modules, and scanner templates are available after registration.
View exploit detailsAttack Graph
Click technique nodes for MITRE ATT&CK details · drag to pan · Ctrl/⌘ + scroll to zoom, or go fullscreen.
MITRE ATT&CK
2 techniquesReferences
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2018-11235 and every CVE in our database. Create a free account — no credit card required.
Create Free Account