CVE-2023-4759: Org.eclipse.jgit Arbitrary File Overwrite Vulnerability
HIGHCVE-2023-4759 is a HIGH (CVSS 8.8) arbitrary file overwrite vulnerability (CWE-178: Improper Handling of Case Sensitivity) affecting Org.eclipse.jgit libraries in the Maven ecosystem. The issue involves arbitrary file overwrite in eclipse jgit. Remediation is available by upgrading affected packages to version 6.6.1.202309021850-r, 5.13.3.202401111512-r.
CVE-2023-4759 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-4759
To remediate this vulnerability, upgrade all affected Org.eclipse.jgit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.6.1.202309021850-r</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>5.13.3.202401111512-r</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.eclipse.jgit
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-4759, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.eclipse.jgit
Analyze the terminal output to locate any version of Org.eclipse.jgit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.6.1.202309021850-r), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.eclipse.jgit command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-178: Improper Handling of Case Sensitivity, where the product does not properly account for differences in case sensitivity when accessing or determining the properties of a resource, leading to inconsistent results. In Org.eclipse.jgit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-4759 Affected Org.eclipse.jgit Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.eclipse.jgit:org.eclipse.jgit
|
Maven |
≥ 6.0.0.202111291000-r
< 6.6.1.202309021850-r
|
6.6.1.202309021850-r
|
|
org.eclipse.jgit:org.eclipse.jgit
|
Maven |
< 5.13.3.202401111512-r
|
5.13.3.202401111512-r
|
References
Frequently Asked Questions
What is CVE-2023-4759?
Which Org.eclipse.jgit versions are affected?
What version fixes CVE-2023-4759?
Is org.eclipse.jgit affected?
What is the CVSS score of CVE-2023-4759?
What CWE is associated with CVE-2023-4759?
How can I check Maven dependencies for CVE-2023-4759?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3p86-9955-h393",
"modified" : "2024-04-11T19:37:35Z",
"published" : "2023-09-18T15:30:18Z",
"aliases" : [ "CVE-2023-4759" ],
"summary" : "Arbitrary File Overwrite in Eclipse JGit ",
"details" : "Arbitrary File Overwrite in Eclipse JGit <= 6.6.0\n\nIn Eclipse JGit, all versions <= 6.6.0.202305301015-r, a symbolic link present in a specially crafted git repository can be used to write a file to locations outside the working tree when this repository is cloned with JGit to a case-insensitive filesystem, or when a checkout from a clone of such a repository is performed on a case-insensitive filesystem.\n\nThis can happen on checkout (DirCacheCheckout), merge (ResolveMerger via its WorkingTreeUpdater), pull (PullCommand using merge), and when applying a patch (PatchApplier). This can be exploited for remote code execution (RCE), for instance if the file written outside the working tree is a git filter that gets executed on a subsequent git command.\n\nThe issue occurs only on case-insensitive filesystems, like the default filesystems on Windows and macOS. The user performing the clone or checkout must have the rights to create symbolic links for the problem to occur, and symbolic links must be enabled in the git configuration.\n\nSetting git configuration option core.symlinks = false before checking out avoids the problem.\n\nThe issue was fixed in Eclipse JGit version 6.6.1.202309021850-r and 6.7.0.202309050840-r, available via Maven Central https://repo1.maven.org/maven2/org/eclipse/jgit/ and repo.eclipse.org https://repo.eclipse.org/content/repositories/jgit-releases/ . A backport is available in 5.13.3 starting from 5.13.3.202401111512-r.\n\nThe JGit maintainers would like to thank RyotaK for finding and reporting this issue.\n\n\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.eclipse.jgit:org.eclipse.jgit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0.202111291000-r"
}, {
"fixed" : "6.6.1.202309021850-r"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.6.0.202305301015-r"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.eclipse.jgit:org.eclipse.jgit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.13.3.202401111512-r"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-4759"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-jgit/jgit/issues/30"
}, {
"type" : "PACKAGE",
"url" : "https://git.eclipse.org/c/jgit/jgit.git"
}, {
"type" : "WEB",
"url" : "https://git.eclipse.org/c/jgit/jgit.git/commit/?id=9072103f3b3cf64dd12ad2949836ab98f62dabf1"
}, {
"type" : "WEB",
"url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/11"
}, {
"type" : "WEB",
"url" : "https://projects.eclipse.org/projects/technology.jgit/releases/5.13.3"
}, {
"type" : "WEB",
"url" : "https://projects.eclipse.org/projects/technology.jgit/releases/6.6.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-178" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-18T19:17:54Z",
"nvd_published_at" : "2023-09-12T10:15:29Z"
}
}