CVE-2022-39253
vulnerability analysis and mitigation

Overview

CVE-2022-39253 affects Git, a distributed revision control system. The vulnerability was discovered by Cory Snider of Mirantis and was disclosed in October 2022. When performing a local clone operation, Git would dereference symbolic links in the source repository's $GIT_DIR/objects directory before creating hardlinks or copies in the destination repository (GitHub Advisory).

Technical details

The vulnerability occurs during Git's local clone optimization process, where Git copies contents from the source's $GITDIR/objects directory into the destination by creating hardlinks or copies. The issue arises when Git dereferences symbolic links in the source repository before creating these hardlinks, which can lead to unexpected behavior where arbitrary files become present in a repository's $GITDIR when cloning from a malicious repository (Fedora Update).

Impact

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 achieved either by having the victim clone a malicious repository on the same machine or by having them clone a malicious repository embedded as a bare repository via a submodule with the --recurse-submodules option (GitHub Advisory).

Mitigation and workarounds

The issue has been patched in Git versions 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, 2.37.4, and 2.38.1. As workarounds, users can avoid cloning untrusted repositories using the --local optimization by passing the --no-local option to git clone, or by cloning from a URL that uses the file:// scheme. Additionally, users should avoid cloning repositories from untrusted sources with --recurse-submodules (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management