ubuntu-cve-2022-24765
Vulnerability from osv_ubuntu
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.
{
"affected": [
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-all",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-el",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-email",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-man",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "gitk",
"binary_version": "1:2.17.1-1ubuntu0.11"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.17.1-1ubuntu0.11"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.17.1-1ubuntu0.11?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.17.1-1ubuntu0.11"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.14.1-1ubuntu4",
"1:2.15.1-1ubuntu2",
"1:2.17.0-1ubuntu1",
"1:2.17.1-1ubuntu0.1",
"1:2.17.1-1ubuntu0.3",
"1:2.17.1-1ubuntu0.4",
"1:2.17.1-1ubuntu0.5",
"1:2.17.1-1ubuntu0.6",
"1:2.17.1-1ubuntu0.7",
"1:2.17.1-1ubuntu0.8",
"1:2.17.1-1ubuntu0.9",
"1:2.17.1-1ubuntu0.10"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-all",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-el",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-email",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-man",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "gitk",
"binary_version": "1:2.25.1-1ubuntu3.4"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.25.1-1ubuntu3.4"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.25.1-1ubuntu3.4?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.25.1-1ubuntu3.4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.20.1-2ubuntu1",
"1:2.24.0-1ubuntu1",
"1:2.24.0-1ubuntu2",
"1:2.25.0-1ubuntu1",
"1:2.25.1-1ubuntu1",
"1:2.25.1-1ubuntu2",
"1:2.25.1-1ubuntu3",
"1:2.25.1-1ubuntu3.1",
"1:2.25.1-1ubuntu3.2",
"1:2.25.1-1ubuntu3.3"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-all",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-email",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-man",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "gitk",
"binary_version": "1:2.34.1-1ubuntu1.2"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.34.1-1ubuntu1.2"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.34.1-1ubuntu1.2?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.34.1-1ubuntu1.2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.32.0-1ubuntu1",
"1:2.33.1-1ubuntu1",
"1:2.34.1-1ubuntu1",
"1:2.34.1-1ubuntu1.1"
]
}
],
"aliases": [],
"details": "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`.",
"id": "UBUNTU-CVE-2022-24765",
"modified": "2025-09-08T16:50:03Z",
"published": "2022-04-12T17:00:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2022-24765"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5376-1"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5376-2"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5376-3"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2022-24765"
}
],
"related": [
"USN-5376-1",
"USN-5376-2",
"USN-5376-3"
],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2022-24765"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.