Uncontrolled search for the Git directory in Git for Windows
Noroxi assessment
Priority: Monitor (action score 31/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1% (FIRST EPSS); higher than 62.7% of all records.
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: git (AlmaLinux:8) 2.39.1-1.el8; git-all (AlmaLinux:8) 2.39.1-1.el8; git-core (AlmaLinux:8) 2.39.1-1.el8.
Low priority for now. Upgrade to git (AlmaLinux:8) 2.39.1-1.el8; git-all (AlmaLinux:8) 2.39.1-1.el8; git-core (AlmaLinux:8) 2.39.1-1.el8 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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`.
- BDU:2022-02723
- ALSA-2023:2319
- ALSA-2023:2859
- DLA-3239-1
- DSA-5332-1
- openSUSE-SU-2024:12003-1
- openSUSE-SU-2024:12005-1
- openSUSE-SU-2024:12223-1
- RHSA-2023:2319
- RHSA-2023:2859
- RHSA-2024:0407
- SUSE-SU-2022:1260-1
- SUSE-SU-2022:1306-1
- SUSE-SU-2022:1484-1
- SUSE-SU-2022:3283-1
- SUSE-SU-2022:3494-1
- SUSE-SU-2022:3495-1
- Published
- Apr 12, 2022
- Updated
- Jun 17, 2026
- EPSS
- 1.0% · 62th percentile
- CWE
- CWE-427
Report tools
Action score
31
Monitor
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.0%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.8
- CNA · GitHub_M
- 6.0
- 1.8 point gap
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| git-scm | git | cpe:2.3:a:git-scm:git |
| microsoft | windows | cpe:2.3:o:microsoft:windows |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| apple | xcode | cpe:2.3:a:apple:xcode |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- apple xcodebefore 13.4
- debian debian linux10.0
- fedoraproject fedora34
- fedoraproject fedora35
- fedoraproject fedora36
- fedoraproject fedora37
- git-scm gitbefore 2.35.2
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
git-for-windows git
- < 2.35.2affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | git | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-all | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-core | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-core-doc | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-credential-libsecret | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-daemon | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-email | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-gui | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-instaweb | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-subtree | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | git-svn | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | gitk | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | gitweb | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | perl-Git | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:8 | perl-Git-SVN | before 2.39.1-1.el8 | 2.39.1-1.el8 |
| AlmaLinux:9 | git | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-all | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-core | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-core-doc | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-credential-libsecret | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-daemon | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-email | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-gui | before 2.39.1-1.el9 | 2.39.1-1.el9 |
| AlmaLinux:9 | git-instaweb | before 2.39.1-1.el9 | 2.39.1-1.el9 |
+87
Same product
git-scm: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-17456Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows r68This week
- CVE-2025-48384Git allows arbitrary code execution through broken config quotingKEV63This week
- CVE-2021-21300malicious repositories can execute remote code while cloning60This week
Published before and after this one in the same product
- ← EarlierCVE-2021-40330Aug 31, 2021 · git_connect_git in connect.c in Git before 2.30.1 allows a repository path to contain a newline character, which may result in unexpected cr31Monitor
- ← EarlierCVE-2022-24975Feb 11, 2022 · The --mirror documentation for Git through 2.35.1 does not mention the availability of deleted content, aka the "GitBleed" issue.31Monitor
- Later →CVE-2022-29187Jul 12, 2022 · Bypass of safe.directory protections in Git31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:git | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-all | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-core | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-core-doc | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-credential-libsecret | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-daemon | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-email | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-gui | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-instaweb | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-subtree | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:git-svn | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:gitk | 2.39.1-1.el9 · AlmaLinux:9 | Package registry (OSV) |
| alpine:git | 2.30.3-r0 · Alpine:v3.13 | Package registry (OSV) |
| debian:git | 1:2.35.2-1 · Debian:12 | Package registry (OSV) |
| opensuse:git | 2.26.2-150000.36.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| opensuse:git-annex | 10.20220624-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:libgit2 | 1.3.0-150400.3.3.1 · openSUSE:Leap 15.4 | Package registry (OSV) |
| red hat:git | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-all | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-core | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-core-debuginfo | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-core-doc | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-credential-libsecret | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-credential-libsecret-debuginfo | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-daemon | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-daemon-debuginfo | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-debuginfo | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-debugsource | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:git-email | 0:2.39.1-1.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| suse:git | 2.26.2-150000.36.1 · SUSE:Linux Enterprise High Performance Computing 15-ESPOS | Package registry (OSV) |
+1
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-427 · Uncontrolled Search Path ElementCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
- Hijack Execution Flow:DLL search order hijackingT1574.001
- Hijack Execution Flow: Dylib HijackingT1574.004
- Hijack Execution Flow: Path Interception by PATH Environment VariableT1574.007
- Hijack Execution Flow: Path Interception by Search Order HijackingT1574.008
- Hijack Execution Flow: Path Interception by Unquoted PathT1574.009
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (16 more)Show less
- www.openwall.com/lists/oss-security/2022/04/12/7
- git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash
- git-scm.com/docs/git#Documentation/git.txt-codeGITCEILINGDIRECTORIEScode
- github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2
- lists.debian.org/debian-lts-announce/2022/12/msg00025.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5PTN5NYEHYN2OQSHSAMCNICZNK2U4QH6/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BENQYTDGUL6TF3UALY6GSIEXIHUIYNWM/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DDI325LOO2XBDDKLINOAQJEG6MHAURZE/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DIKWISWUDFT2FAITYIA6372BVLH3OOOC/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVOLER2PIGMHPQMDGG4RDE2KZB74QLA2/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SLP42KIZ6HACTVZMZLJLFJQ4W2XYT27M/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TRZG5CDUQ27OWTPC5MQOR4UASNXHWEZS/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UDZRZAL7QULOB6V7MKT66MOMWJLBJPX4/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YROCMBWYFKRSS64PO6FUNM6L7LKBUKVW/
- security.gentoo.org/glsa/202312-15
- support.apple.com/kb/HT213261
Vendor advisories and official records. Exploit/PoC links are deliberately left out.