# CVE-2014-9390: JGit Improper Input Validation vulnerability

> Remote Git servers can execute arbitrary commands on Windows and OS X clients via crafted .git/config files exploiting case-insensitive filesystems.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Feb 2020
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2014-9390, GHSA-6vvc-c2m3-cjf3, MGASA-2014-0546, MGASA-2015-0325, PYSEC-2020-217, UBUNTU-CVE-2014-9390, USN-2470-1

## What is CVE-2014-9390?

CVE-2014-9390 is a critical command injection vulnerability in Apple Xcode, published on 12 Feb 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2014-9390?

5 open source packages ship an affected version, including mercurial and org.eclipse.jgit:org.eclipse.jgit. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mercurial` | PyPI | All versions | 3.2.3 |
| `mercurial` | PyPI | All versions | 3.2.3 |
| `mercurial` | PyPI | All versions | 3.2.3 |
| `org.eclipse.jgit:org.eclipse.jgit` | Maven | All versions | 3.5.3 |
| `org.eclipse.jgit:org.eclipse.jgit` | Maven | All versions | 3.5.3 |

Products: Apple Xcode, Eclipse Egit, Eclipse Jgit, Git-Scm Git, Libgit2 Libgit2, Mercurial Mercurial.

## How do I fix CVE-2014-9390?

Upgrade mercurial to 3.2.3 or later.

## Is CVE-2014-9390 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2014-9390 exists.

Public exploit code:

- Malicious Git and Mercurial HTTP Server For CVE-2014-9390 (metasploit)

## Other vulnerabilities in Apple Xcode

- [CVE-2025-48384](https://insights.sbomify.com/CVE-2025-48384/): Git Link Following (high 8.1, exploited in the wild)
- [CVE-2019-14379](https://insights.sbomify.com/CVE-2019-14379/): Deserialization of untrusted data in FasterXML jackson-databind (critical 9.8)
- [CVE-2018-4164](https://insights.sbomify.com/CVE-2018-4164/): An issue was discovered in certain Apple products. (critical 9.8)
- [CVE-2016-0746](https://insights.sbomify.com/CVE-2016-0746/): Use after free in n/a (critical 9.8)
- [CVE-2004-2687](https://insights.sbomify.com/CVE-2004-2687/): Missing authorization in n/a (critical 9.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2014-9390 and fix it if it is affected.

What it is: CVE-2014-9390 is a critical command injection vulnerability in Apple Xcode, published on 12 Feb 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2014-9390 exists.

Affected packages and fixed versions:
- mercurial (PyPI): affected all versions; fixed in 3.2.3
- mercurial (PyPI): affected all versions; fixed in 3.2.3
- mercurial (PyPI): affected all versions; fixed in 3.2.3
- org.eclipse.jgit:org.eclipse.jgit (Maven): affected all versions; fixed in 3.5.3
- org.eclipse.jgit:org.eclipse.jgit (Maven): affected all versions; fixed in 3.5.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2014-9390/ (Markdown: https://insights.sbomify.com/CVE-2014-9390/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2014-9390
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2014-9390
- OSV: https://osv.dev/vulnerability/CVE-2014-9390

---
From sbomify Insights: https://insights.sbomify.com/CVE-2014-9390/
Summaries are generated and may contain mistakes; the official description above is the record.
