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

> Attackers can exfiltrate arbitrary local files by tricking Git into using local clone optimizations with symbolic links in malicious repositories.

- **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:** 14 Feb 2023
- **Updated:** 8 Oct 2026
- **Also known as:** ALPINE-CVE-2023-22490, CLEANSTART-2026-YR55229, DEBIAN-CVE-2023-22490, UBUNTU-CVE-2023-22490, USN-5871-2

## What is CVE-2023-22490?

CVE-2023-22490 is a medium-severity path traversal vulnerability in git, published on 14 Feb 2023. 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 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.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2023-22490?

It affects 1 product.


Products: Git-Scm Git.

## How do I fix CVE-2023-22490?

Upgrade to a fixed version.

## Is CVE-2023-22490 being exploited?

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

Public exploit code:

- https://github.com/smash8tap/CVE-2023-22490_PoC (github_poc): https://github.com/smash8tap/CVE-2023-22490_PoC

## Other vulnerabilities in git

- [CVE-2022-23521](https://insights.sbomify.com/CVE-2022-23521/): gitattributes parsing integer overflow in git (critical 9.8)
- [CVE-2022-41903](https://insights.sbomify.com/CVE-2022-41903/): Integer overflow in `git archive`, `git log --format` leading to RCE in git (critical 9.8)
- [CVE-2019-1353](https://insights.sbomify.com/CVE-2019-1353/): Security feature bypass in Git (critical 9.8)
- [CVE-2016-2315](https://insights.sbomify.com/CVE-2016-2315/): Memory corruption in n/a (critical 9.8)
- [CVE-2016-2324](https://insights.sbomify.com/CVE-2016-2324/): Integer overflow in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-22490 and fix it if it is affected.

What it is: CVE-2023-22490 is a medium-severity path traversal vulnerability in git, published on 14 Feb 2023. 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-2023-22490 in the wild and no public exploit code.

Affected product: git. 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-2023-22490/ (Markdown: https://insights.sbomify.com/CVE-2023-22490/index.md)
```

## Sources

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

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