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

Published Feb 8, 2023
·
Updated

A vulnerability was found in Git. Using a specially-crafted repository, Git can be tricked into using its local clone optimization even when using a non-local transport. Though Git will abort local clones whose source $GITDIR/objects directory contains symbolic links (CVE-2022-39253), the objects directory may still be a symbolic link.

Other sources

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 $GITDIR/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.

MITRE

Using a specially-crafted repository, Git can be tricked into using its local clone optimization even when using a non-local transport. Though Git will abort local clones whose source $GITDIR/objects directory contains symbolic links (c.f., CVE-2022-39253), the objects directory itself may still be a symbolic link.

GitLab

Affected Software

12 affected componentsFixes available
redhat/git<0:2.39.3-1.el8_8
0:2.39.3-1.el8_8
redhat/git<0:2.39.3-1.el9_2
0:2.39.3-1.el9_2
git-scm Git<2.30.8
git-scm Git>=2.31.0<2.31.7
git-scm Git>=2.32.0<2.32.6
git-scm Git>=2.33.0<2.33.7
git-scm Git>=2.34.0<2.34.7
git-scm Git>=2.35.0<2.35.7
git-scm Git>=2.36.0<2.36.5
git-scm Git>=2.37.0<2.37.6
git-scm Git>=2.38.0<2.38.4
git-scm Git>=2.39.0<2.39.2

Remediation

Information

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

Event History

Feb 8, 2023
Data Sourced
via Red Hat·10:44 AM
DescriptionSeverityAffected Software
Feb 14, 2023
CVE Published
12:00 AM
Data Sourced
via GitLab·12:00 AM
Description
CVE Published
via MITRE·07:47 PM
Data Sourced
via MITRE·07:47 PM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this Git vulnerability?

The vulnerability ID for this Git vulnerability is CVE-2023-22490.

2

What is the severity level of CVE-2023-22490?

The severity level of CVE-2023-22490 is medium.

3

How can Git be tricked into using its local clone optimization even when using a non-local transport?

Git can be tricked into using its local clone optimization even when using a non-local transport by using a specially-crafted repository.

4

What versions of Git are affected by this vulnerability?

Versions of Git prior to 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 are affected by this vulnerability.

5

How can I fix CVE-2023-22490?

To fix CVE-2023-22490, update Git to version 2.39.3-1.el8_8 or 2.39.3-1.el9_2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203