CVE-2014-9390
Critical · 9.8CVSS
9.8
EPSS
75.6%
Published
Feb 12, 2020
CISA due date
—
Cloudanix analysis
A flaw in older Git and related tools on Windows and Mac lets attackers who control a repository run harmful commands on a developer's computer simply by tricking the tool into accepting a disguised settings file.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper handling of case, Unicode codepoints, and alternate filename representations on case-insensitive filesystems allows a remote Git server to cause a crafted .git/config file to be written and subsequently processed, resulting in arbitrary command execution during clone or other operations.
Why it matters to the business
Developers and organizations using affected Git, Mercurial, Xcode, and related tools on Windows or macOS face risk of full workstation compromise, theft of source code and credentials, and supply-chain insertion when cloning repositories from untrusted sources; the high EPSS and weaponized exploit maturity increase urgency for any remaining unpatched systems despite the CVE age.
How an attack unfolds
An attacker hosts a malicious repository containing a tree entry that resolves to .git/config via case folding, git~1, or ignorable Unicode on Windows or macOS; when a victim clones or updates from the repo, the client writes and interprets the attacker-controlled config, executing arbitrary commands such as shell hooks or credential exfiltration.
How to fix it
Upgrade Git to 1.8.5.6+, 1.9.5+, 2.0.5+, 2.1.4+, or 2.2.1+; upgrade Mercurial to 3.2.3+; upgrade Apple Xcode to 6.2 beta 3 or later; upgrade libgit2 past 0.21.2; update EGit and JGit to versions released after 2014-08-12; avoid cloning repositories from untrusted sources until patched.
How to confirm the fix worked
Verify client versions meet or exceed the minimums listed in remediation; test clone operations against a synthetic malicious repository that exercises the case/Unicode config paths; confirm no .git/config files with unexpected hook or alias entries appear after clone on case-insensitive volumes.
Typical attack path
- Attacker creates or compromises a Git repository containing a malicious tree entry for the config file using case/Unicode tricks
- Victim performs git clone or fetch against the malicious repository on a case-insensitive filesystem
- Client writes the attacker-supplied config into the local .git directory
- Git processes the malicious configuration and executes embedded commands or hooks
- Attacker gains code execution, credential access, or persistence on the victim workstation
How to detect it
Search Git and Mercurial client logs for clones of repositories containing .git/config entries created via case folding or Unicode; inspect post-clone .git/config files for unexpected core.hooksPath, alias, or credential helper settings; correlate with process execution of commands listed in those configs.
- .git/config containing core.hooksPath
- git clone.*~1/
- Unicode U+200C or U+200D in repository tree entries
- git~1/config file creation events
What your security team should do
- Immediately inventory and upgrade all developer workstations and CI systems running affected Git, Mercurial, Xcode, libgit2, EGit, or JGit versions
- Block or monitor outbound clones from untrusted or newly created repositories until patch deployment completes
- Add repository-clone logging and .git/config change detection to endpoint monitoring for the next 90 days
The record
Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x before 2.2.1 on Windows and OS X; Mercurial before 3.2.3 on Windows and OS X; Apple Xcode before 6.2 beta 3; mine all versions before 08-12-2014; libgit2 all versions up to 0.21.2; Egit all versions before 08-12-2014; and JGit all versions before 08-12-2014 allow remote Git servers to execute arbitrary commands via a tree containing a crafted .git/config file with (1) an ignorable Unicode codepoint, (2) a git~1/config representation, or (3) mixed case that is improperly handled on a case-insensitive filesystem.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.eclipse.jgit:org.eclipse.jgit | 0 | 3.5.3 |
| PyPI | mercurial | 0 | 3.2.3 |
| Debian:11 | dulwich | 0 | 0.10.1-1 |
| Debian:11 | git | 0 | 1:2.1.4-1 |
| Debian:11 | jgit | 0 | 3.7.0-1 |
| Debian:11 | libgit2 | 0 | 0.21.3-1 |
| Debian:11 | mercurial | 0 | 3.1.2-2 |
| Debian:12 | dulwich | 0 | 0.10.1-1 |
| Debian:12 | git | 0 | 1:2.1.4-1 |
| Debian:12 | jgit | 0 | 3.7.0-1 |
| Debian:12 | libgit2 | 0 | 0.21.3-1 |
| Debian:12 | mercurial | 0 | 3.1.2-2 |
| Debian:13 | dulwich | 0 | 0.10.1-1 |
| Debian:13 | git | 0 | 1:2.1.4-1 |
| Debian:13 | jgit | 0 | 3.7.0-1 |
| Debian:13 | libgit2 | 0 | 0.21.3-1 |
| Debian:13 | mercurial | 0 | 3.1.2-2 |
| Debian:14 | dulwich | 0 | 0.10.1-1 |
| Debian:14 | git | 0 | 1:2.1.4-1 |
| Debian:14 | jgit | 0 | 3.7.0-1 |
| Debian:14 | libgit2 | 0 | 0.21.3-1 |
| Debian:14 | mercurial | 0 | 3.1.2-2 |
| Debian:6.0 | mercurial | 0 | 1.6.4-1+deb6u1 |
| Mageia:4 | cgit | 0 | 0.11.2-1.mga4 |
| Mageia:4 | git | 0 | 1.8.5.6-1.mga4 |
| Mageia:5 | cgit | 0 | 0.11.2-1.mga5 |
| Ubuntu:14.04:LTS | git | 0 | 1:1.9.1-1ubuntu0.1 |
| Ubuntu:14.04:LTS | mercurial | 0 | 2.8.2-1ubuntu1.3 |
| Ubuntu:16.04:LTS | jgit | 0 | 3.7.1-2 |
| Ubuntu:16.04:LTS | libgit2 | 0 | 0.24.1-2 |
| Ubuntu:Pro:14.04:LTS | libgit2 | 0 | No fix |
| gem | rugged | 0.22a | No fix |
| openSUSE:Tumbleweed | git | 0 | 2.11.0-1.1 |
Related vulnerabilities
- CVE-2025-4949 Eclipse JGit XML External Entity (XXE) Vulnerability Also affects org.eclipse.jgit:org.eclipse.jgit
- CVE-2023-4759 Arbitrary File Overwrite in Eclipse JGit <= 6.6.0 In Eclipse JGit, all versions <=… Also affects org.eclipse.jgit:org.eclipse.jgit
- CVE-2017-9462 In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch… Also affects mercurial
- CVE-2025-48384 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-52005 Git is a source code management tool. Also affects git
- CVE-2024-52006 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2024-50349 Git is a fast, scalable, distributed revision control system with an unusually rich… Also affects git
- CVE-2017-15298 Git through 2.14.2 mishandles layers of tree objects, which allows remote attackers to… Also affects git