Skip to content
OpenAdvisories
High · 8.8 CVE-2023-4759 EUVD-2023-2406GHSA-3p86-9955-h393

Improper handling of case insensitive filesystems in Eclipse JGit allows arbitrary file write

Published Sep 12, 2023 · Updated Aug 2, 2024 · Assigned by eclipse

Description

Arbitrary File Overwrite in Eclipse JGit <= 6.6.0

In 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.

This 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.

The 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.

Setting git configuration option core.symlinks = false before checking out avoids the problem.

The 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.

The JGit maintainers would like to thank RyotaK for finding and reporting this issue.

Affected products

VendorProductAffectedFixed
Eclipse Foundation Eclipse JGit 0.0.0 – ≤ 6.6.0.202305301015-r 5.13.3.202401111512-r

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 jgit 6.7.0-1 —
Debian 13 jgit 6.7.0-1 —
Debian 12 jgit No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 jgit No fix yet —
Ubuntu 26.04 LTS jgit No fix yet —
Ubuntu 25.10 jgit No fix yet —
Ubuntu 24.04 LTS jgit No fix yet —
Ubuntu 22.04 LTS jgit No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS jgit No fix yet —
Ubuntu 18.04 LTS jgit No fix yet —
Ubuntu 16.04 LTS jgit No fix yet —
ReleasePackageFixed inAdvisory
Red Hat JBoss EAP 8 eap8-apache-sshd 2.12.0-1.redhat_00001.1.el8eap RHSA-2024:1193, RHSA-2024:1192
Red Hat JBoss EAP 8 eap8-eclipse-jgit 6.6.1.202309021850-1.r_redhat_00001.1.el8eap RHSA-2024:1193, RHSA-2024:1192
Red Hat JBoss EAP 8 eap8-log4j 2.19.0-2.redhat_00001.1.el8eap RHSA-2024:1193, RHSA-2024:1192
Red Hat JBoss EAP 8 eap8-lucene-core +6 8.11.2-2.redhat_00001.1.el8eap RHSA-2024:1193, RHSA-2024:1192
Red Hat JBoss EAP 8 eap8-parsson 1.1.5-1.redhat_00001.1.el8eap RHSA-2024:1193, RHSA-2024:1192
Red Hat JBoss EAP 8 eap8-wildfly +3 8.0.1-3.GA_redhat_00002.1.el8eap RHSA-2024:1193, RHSA-2024:1192
Red Hat JBoss EAP 7 eap7-eclipse-jgit 5.13.2-1.SP1_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-glassfish-jsf 2.3.14-7.SP08_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-hibernate +4 5.3.33-2.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-ironjacamar +8 1.5.16-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-jboss-cert-helper +1 1.1.1-1.redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-jboss-msc 1.4.13-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-jboss-server-migration +2 1.10.0-34.Final_redhat_00033.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-jbossws-spi 3.4.0-4.Final_redhat_00002.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-log4j2-jboss-logmanager 1.1.2-1.Final_redhat_00002.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-protostream 4.3.6-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-resteasy +18 3.15.9-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-wildfly +4 7.4.15-2.GA_redhat_00002.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-wildfly-elytron +1 1.15.21-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-wildfly-java-jdk17 7.4.15-2.GA_redhat_00002.1.el8eap RHSA-2024:0712, RHSA-2024:0711
Red Hat JBoss EAP 7 eap7-wildfly-naming-client 1.0.17-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-wildfly-transaction-client 1.1.17-1.Final_redhat_00001.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
Red Hat JBoss EAP 7 eap7-xml-security 2.2.6-1.redhat_00002.1.el7eap RHSA-2024:0712, RHSA-2024:0711, RHSA-2024:0710
ReleasePackageFixed inAdvisory
SLES 15 SP5 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SLES 15 SP4 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SLES 15 SP3 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SLES 15 SP2 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SLES for SAP 15 SP2 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SLE HPC 15 SP3 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SLE HPC 15 SP2 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SUSE Manager Server Module 4.3 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
SUSE Enterprise Storage 7.1 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed eclipse-jgit 5.11.0-9.1 openSUSE-SU-2024:13312-1
openSUSE Tumbleweed jgit 5.11.0-2.1 openSUSE-SU-2025:15232-1
openSUSE Leap 15.5 eclipse-jgit 5.11.0-150200.3.15.2 SUSE-SU-2024:0057-1
openSUSE Leap 15.5 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1
openSUSE Leap 15.4 jgit +1 5.11.0-150200.3.15.2 SUSE-SU-2024:0057-1
openSUSE Leap 15.4 jsch 0.2.9-150200.11.10.1 SUSE-SU-2024:0057-1

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.eclipse.jgit:org.eclipse.jgit >= 6.0.0.202111291000-r, < 6.6.1.202309021850-r 6.6.1.202309021850-r GHSA-3p86-9955-h393
Maven org.eclipse.jgit:org.eclipse.jgit < 5.13.3.202401111512-r 5.13.3.202401111512-r GHSA-3p86-9955-h393

Advisories 17

References