cve.bz

CVE-2022-24765 Uncontrolled Search Path Element

7.8 highEPSS 1.0%

High (7.8). EPSS 1.0% estimated probability of exploitation activity in the next 30 days.

On this page
Git for Windows is a fork of Git containing Windows-specific patches. This vulnerability affects users working on multi-user machines, where untrusted parties have write access to the same hard disk. Those untrusted parties could create the folder `C:\.git`, which would be picked up by Git operations run supposedly outside a repository while searching for a Git directory. Git would then respect any config in said Git directory. Git Bash users who set `GIT_PS1_SHOWDIRTYSTATE` are vulnerable as well. Users who installed posh-gitare vulnerable simply by starting a PowerShell. Users of IDEs such as Visual Studio are vulnerable: simply creating a new project would already read and respect the config specified in `C:\.git\config`. Users of the Microsoft fork of Git are vulnerable simply by starting a Git Bash. The problem has been patched in Git for Windows v2.35.2. Users unable to upgrade may create the folder `.git` on all drives where Git commands are run, and remove read/write access from those folders as a workaround. Alternatively, define or extend `GIT_CEILING_DIRECTORIES` to cover the _parent_ directory of the user profile, e.g. `C:\Users` if the user profile is located in `C:\Users\my-user-name`.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
1.0% (unchanged from 1.0% a week ago; 1.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 64th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-12-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-427 Uncontrolled Search Path Element
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-24765 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-24765?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-24765?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-24765 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
git-scm:gitbefore 2.35.2
fedoraproject:fedora34
fedoraproject:fedora35
fedoraproject:fedora36
fedoraproject:fedora37
apple:xcodebefore 13.4
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10git1:2.20.1-2+deb10u5DLA-3239-1
Debian11git1:2.30.2-1+deb11u1DSA-5332-1
Debian12, 13, 14git1:2.35.2-1DEBIAN-CVE-2022-24765
Ubuntu18.04:LTSgit1:2.17.1-1ubuntu0.11UBUNTU-CVE-2022-24765 USN-5376-1
Ubuntu20.04:LTSgit1:2.25.1-1ubuntu3.4UBUNTU-CVE-2022-24765 USN-5376-1
Ubuntu22.04:LTSgit1:2.34.1-1ubuntu1.2UBUNTU-CVE-2022-24765 USN-5376-2
Red Hatenterprise_linux:8::appstreamgit, gitk, gitweb and 17 more0:2.39.1-1.el8RHSA-2023:2859
Red Hatenterprise_linux:9::appstreamgit, gitk, gitweb and 17 more0:2.39.1-1.el9RHSA-2023:2319
Red Hatrhel_eus:8.6::appstreamgit, gitk, gitweb and 17 more0:2.31.8-1.el8_6RHSA-2024:0407
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 17 moregit2.26.2-150000.36.1SUSE-SU-2022:1260-1
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 16 morelibgit20.26.8-150000.3.15.1SUSE-SU-2022:3495-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 10 morelibgit20.28.4-150200.3.3.1SUSE-SU-2022:3494-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 11 moregit2.26.2-27.52.1SUSE-SU-2022:1306-1
SUSELinux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Development Tools 15 SP3git2.35.3-150300.10.12.1SUSE-SU-2022:1484-1
SUSELinux Enterprise Module for Development Tools 15 SP4libgit21.3.0-150400.3.3.1SUSE-SU-2022:3283-1
openSUSELeap 15.3git2.26.2-150000.36.1SUSE-SU-2022:1260-1
openSUSELeap 15.3, Leap 15.4git2.35.3-150300.10.12.1SUSE-SU-2022:1484-1
openSUSELeap 15.3, Leap 15.4libgit20.26.8-150000.3.15.1SUSE-SU-2022:3495-1
openSUSELeap 15.3, Leap 15.4libgit20.28.4-150200.3.3.1SUSE-SU-2022:3494-1
openSUSELeap 15.4libgit21.3.0-150400.3.3.1SUSE-SU-2022:3283-1
openSUSETumbleweedgit2.35.3-1.1openSUSE-SU-2024:12003-1
openSUSETumbleweedgit-annex10.20220624-1.1openSUSE-SU-2024:12223-1
openSUSETumbleweedlibgit21.4.3-1.1openSUSE-SU-2024:12005-1
AlmaLinux8git, gitk, gitweb and 12 more2.39.1-1.el8ALSA-2023:2859
AlmaLinux9git, gitk, gitweb and 12 more2.39.1-1.el9ALSA-2023:2319
Alpinev3.13git2.30.3-r0ALPINE-CVE-2022-24765
Alpinev3.14git2.32.1-r0ALPINE-CVE-2022-24765
Alpinev3.15git2.34.2-r0ALPINE-CVE-2022-24765
Alpinev3.16, v3.17, v3.18 and 6 moregit2.35.2-r0ALPINE-CVE-2022-24765
Alpinev3.17, v3.18, v3.19 and 5 morelibgit21.4.4-r0ALPINE-CVE-2022-24765

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8git-0:2.39.1-1.el8Fixed 2023-05-16RHSA-2023:2859
Red Hat Enterprise Linux 8.6 Extended Update Supportgit-0:2.31.8-1.el8_6Fixed 2024-01-25RHSA-2024:0407
Red Hat Enterprise Linux 9git-0:2.39.1-1.el9Fixed 2023-05-09RHSA-2023:2319
Red Hat Enterprise Linux 6gitOut of support scope
Red Hat Enterprise Linux 7gitOut of support scope
Red Hat Software Collectionsrh-git227-gitWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-24765.

Attack patterns (CAPEC)

  • CAPEC-38 Leveraging/Manipulating Configuration File Search Paths Likelihood: High · Severity: Very High
  • CAPEC-471 Search Order Hijacking Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON