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

> Attackers can expose sensitive local files by tricking victims into cloning malicious repositories with symbolic links in the objects directory.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 Oct 2022
- **Updated:** 3 Aug 2024
- **Also known as:** ALPINE-CVE-2022-39253, CLEANSTART-2024-XV18933, CLEANSTART-2026-DU64203, CLEANSTART-2026-ZJ93716, CLSA-2023-1681137249, DEBIAN-CVE-2022-39253, GHSA-3wp6-j8xr-qw85, UBUNTU-CVE-2022-39253, USN-5686-4, openSUSE-SU-2024:12430-1, openSUSE-SU-2024:12851-1, openSUSE-SU-2026:10987-1

## What is CVE-2022-39253?

CVE-2022-39253 is a medium-severity vulnerability in Apple Xcode, published on 19 Oct 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

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

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2022-39253?

It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `docker-compose` | openSUSE:Tumbleweed | All versions | 2.12.2-1.1 |
| `perl-Git-Repository` | openSUSE:Tumbleweed | All versions | 1.326.0-1.1 |
| `reuse` | openSUSE:Tumbleweed | All versions | 1.1.2-1.1 |

Products: Apple Xcode, Debian Debian Linux, Fedoraproject Fedora, Git-Scm Git.

## How do I fix CVE-2022-39253?

Upgrade to a fixed version.

## Is CVE-2022-39253 being exploited?

There is no known exploitation of CVE-2022-39253 in the wild and no public exploit code.

Public exploit code:

- https://github.com/ssst0n3/docker-cve-2022-39253-poc (github_poc): https://github.com/ssst0n3/docker-cve-2022-39253-poc
- https://nvd.nist.gov/vuln/detail/CVE-2022-39253 (github_poc): https://github.com/HiImDarwin/NetworkSecurityFinalProject

## Other vulnerabilities in Apple Xcode

- [CVE-2025-48384](https://insights.sbomify.com/CVE-2025-48384/): Git Link Following (high 8.1, exploited in the wild)
- [CVE-2014-9390](https://insights.sbomify.com/CVE-2014-9390/): JGit Improper Input Validation vulnerability (critical 9.8)
- [CVE-2019-14379](https://insights.sbomify.com/CVE-2019-14379/): Deserialization of untrusted data in FasterXML jackson-databind (critical 9.8)
- [CVE-2018-4164](https://insights.sbomify.com/CVE-2018-4164/): An issue was discovered in certain Apple products. (critical 9.8)
- [CVE-2016-0746](https://insights.sbomify.com/CVE-2016-0746/): Use after free in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-39253 and fix it if it is affected.

What it is: CVE-2022-39253 is a medium-severity vulnerability in Apple Xcode, published on 19 Oct 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-39253 in the wild and no public exploit code.

Affected product: Apple Xcode. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-39253/ (Markdown: https://insights.sbomify.com/CVE-2022-39253/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-39253
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-39253
- OSV: https://osv.dev/vulnerability/CVE-2022-39253

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-39253/
Summaries are generated and may contain mistakes; the official description above is the record.
