Vulnerability · Published Feb 14, 2023 · Assigned by GitHub_M

CVE-2023-22490Git vulnerable to local clone-based data exfiltration with non-local transports

Medium 5.5

In plain English

A medium-severity security flaw in git from git. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 54% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.7%top 46.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official description

Git is a revision control system. Using a specially-crafted repository, Git prior to versions 2.39.2, 2.38.4, 2.37.6, 2.36.5, 2.35.7, 2.34.7, 2.33.7, 2.32.6, 2.31.7, and 2.30.8 can be tricked into using its local clone optimization even when using a non-local transport. Though Git will abort local clones whose source `$GIT_DIR/objects` directory contains symbolic links, the `objects` directory itself may still be a symbolic link. These two may be combined to include arbitrary files based on known paths on the victim's filesystem within the malicious repository's working copy, allowing for data exfiltration in a similar manner as CVE-2022-39253. A fix has been prepared and will appear in v2.39.2 v2.38.4 v2.37.6 v2.36.5 v2.35.7 v2.34.7 v2.33.7 v2.32.6, v2.31.7 and v2.30.8. If upgrading is impractical, two short-term workarounds are available. Avoid cloning repositories from untrusted sources with `--recurse-submodules`. Instead, consider cloning repositories without recursively cloning their submodules, and instead run `git submodule update` at each layer. Before doing so, inspect each new `.gitmodules` file to ensure that it does not contain suspicious module URLs.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8git2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-all2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-all2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-core2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-core2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-core-doc2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-core-doc2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-credential-libsecret2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-credential-libsecret2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-daemon2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-daemon2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-email2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-email2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-gui2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-gui2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-instaweb2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-instaweb2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-subtree2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-subtree2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8git-svn2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9git-svn2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8gitk2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9gitk2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8gitweb2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9gitweb2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8perl-Git2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9perl-Git2.39.3-1.el9_2ALSA-2023:3245
AlmaLinux:8perl-Git-SVN2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux:9perl-Git-SVN2.39.3-1.el9_2ALSA-2023:3245
Alpine:v3.20git2.39.2-r0ALPINE-CVE-2023-22490
Alpine:v3.21git2.39.2-r0ALPINE-CVE-2023-22490
Alpine:v3.22git2.39.2-r0ALPINE-CVE-2023-22490
Alpine:v3.23git2.39.2-r0ALPINE-CVE-2023-22490
Alpine:v3.24git2.39.2-r0ALPINE-CVE-2023-22490
Debian:12git1:2.39.2-1DEBIAN-CVE-2023-22490
Debian:13git1:2.39.2-1DEBIAN-CVE-2023-22490
Debian:14git1:2.39.2-1DEBIAN-CVE-2023-22490
Rocky Linux:8git0:2.39.3-1.el8_8RLSA-2023:3246
Ubuntu:22.04:LTSgit1:2.34.1-1ubuntu1.8UBUNTU-CVE-2023-22490
Ubuntu:22.04:LTSgit1:2.34.1-1ubuntu1.8USN-5871-1

Affected products (as reported)

VendorProductVersions
git git >= 2.39.0, < 2.39.2>= 2.38.0, < 2.38.4>= 2.37.0, < 2.37.6>= 2.36.0, < 2.36.5>= 2.35.0, < 2.35.7>= 2.34.0, < 2.34.7>= 2.33.0, < 2.33.7>= 2.32.0, < 2.32.6

Weakness: CWE-59 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

References