CVE-2022-39253
Git subject to exposure of sensitive information via local clone of symbolic links
Check your servers for CVE-2022-39253
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-39253 affects git, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Git is an open source, scalable, distributed revision control system. Versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 are subject to exposure of sensitive information to a malicious actor. When performing a local clone (where the source and target of the clone are on the same volume), Git copies the contents of the source's `$GIT_DIR/objects` directory into the destination by either creating hardlinks to the source contents, or copying them (if hardlinks are disabled via `--no-hardlinks`). A malicious actor could convince a victim to clone a repository with a symbolic link pointing at sensitive information on the victim's machine. This can be done either by having the victim clone a malicious repository on the same machine, or having them clone a malicious repository embedded as a bare repository via a submodule from any source, provided they clone with the `--recurse-submodules` option. Git does not create symbolic links in the `$GIT_DIR/objects` directory. The problem has been patched in the versions published on 2022-10-18, and backported to v2.30.x. Potential workarounds: Avoid cloning untrusted repositories using the `--local` optimization when on a shared machine, either by passing the `--no-local` option to `git clone` or cloning from a URL that uses the `file://` scheme. Alternatively, avoid cloning repositories from untrusted sources with `--recurse-submodules` or run `git config --global protocol.file.allow user`.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.87%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 56.5% of all scored CVEs. Scores of 30 Nov 2026.
Weakness
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| git |
affected < 2.30.6 affected < 2.31.5 affected < 2.32.4 affected < 2.33.5 affected < 2.34.5 affected < 2.35.5 affected < 2.36.3 affected < 2.37.4
|
Is my server affected?
Find the installed version of git and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i git
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2022-39253 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2022-39253RHEL, Rocky, Alma, Fedora
rpm -q git
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2022-39253Alpine
apk list --installed | grep -i gitWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-39253
trivy image --scanners vuln IMAGE | grep CVE-2022-39253
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- FEDORA-2022-12790ca71a lists.fedoraproject.org · vendor advisory
- FEDORA-2022-8b58806840 lists.fedoraproject.org · vendor advisory
- FEDORA-2022-53aadd995f lists.fedoraproject.org · vendor advisory
- FEDORA-2022-2c33bba286 lists.fedoraproject.org · vendor advisory
- FEDORA-2022-fb088df94c lists.fedoraproject.org · vendor advisory
- GLSA-202312-15 security.gentoo.org · vendor advisory
Other references
- https://github.com/git/git/security/advisories/GHSA-3wp6-j8xr-qw85 github.com
- https://support.apple.com/kb/HT213496 support.apple.com
- 20221107 APPLE-SA-2022-11-01-1 Xcode 14.1 seclists.org · mailing list
- [debian-lts-announce] 20221213 [SECURITY] [DLA 3239-1] git security update lists.debian.org · mailing list
- [oss-security] 20230214 [Announce] Git 2.39.2 and friends openwall.com · mailing list
- [oss-security] 20240514 git: 5 vulnerabilities fixed openwall.com · mailing list
Source: the record CVE-2022-39253 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse