Search
Find a vulnerability
Search criteria
Related vulnerabilities
BREW-GIT-CVE-2023-23946 (CVE-2023-23946)
Vulnerability from osv_homebrew – Published: 2026-10-15 03:31 – Updated: 2026-11-13 08:44 – Source website
VLAI
Summary
Git's `git apply` overwriting paths outside the working tree
Details
Git, a revision control system, is vulnerable to path traversal 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. By feeding a crafted input to git apply, a path outside the working tree can be overwritten as the user who is running git apply. 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. As a workaround, use git apply --stat to inspect a patch before applying; avoid applying one that creates a symbolic link and then creates a file beyond the symbolic link.
Upstream
Severity
6.2 (Medium)
References
5 references
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"upstream_fixed_in": "2.39.2"
},
"package": {
"ecosystem": "Homebrew",
"name": "git",
"purl": "pkg:brew/git"
},
"ranges": [
{
"events": [
{
"introduced": "1.6.3.1"
},
{
"fixed": "2.39.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "low",
"source": "matched",
"strategy": "distro",
"upstream_evidence": [
{
"ecosystem": "Debian",
"key": "Debian/git",
"name": "git",
"strategy": "distro"
},
{
"ecosystem": "GIT",
"key": "upstream:https://github.com/git/git",
"name": "https://github.com/git/git",
"strategy": "distro",
"subject_version": "2.56.1"
},
{
"ecosystem": "Ubuntu",
"key": "Ubuntu/git",
"name": "git",
"strategy": "distro"
}
]
},
"details": "Git, a revision control system, is vulnerable to path traversal 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. By feeding a crafted input to `git apply`, a path outside the working tree can be overwritten as the user who is running `git apply`. 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. As a workaround, use `git apply --stat` to inspect a patch before applying; avoid applying one that creates a symbolic link and then creates a file beyond the symbolic link.",
"id": "BREW-git-CVE-2023-23946",
"modified": "2026-11-13T08:44:03Z",
"published": "2026-10-15T03:31:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23946.json"
},
{
"type": "ADVISORY",
"url": "https://github.com/git/git/security/advisories/GHSA-r87m-v37r-cwfh"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-23946"
},
{
"type": "ADVISORY",
"url": "https://security.gentoo.org/glsa/202312-15"
},
{
"type": "FIX",
"url": "https://github.com/git/git/commit/c867e4fa180bec4750e9b54eb10f459030dbebfd"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Git\u0027s `git apply` overwriting paths outside the working tree",
"upstream": [
"CVE-2023-23946",
"GHSA-r87m-v37r-cwfh"
]
}
CVE-2023-23946 (GCVE-0-2023-23946)
Vulnerability from cvelistv5 – Published: 2023-02-14 19:48 – Updated: 2026-10-08 21:14
VLAI
EPSS
VEX
Title
Git's `git apply` overwriting paths outside the working tree
Summary
Git, a revision control system, is vulnerable to path traversal 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. By feeding a crafted input to `git apply`, a path outside the working tree can be overwritten as the user who is running `git apply`. 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. As a workaround, use `git apply --stat` to inspect a patch before applying; avoid applying one that creates a symbolic link and then creates a file beyond the symbolic link.
Severity
6.2 (Medium)
SSVC
Exploitation: none
Automatable: yes
Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2026-10-08 21:13 UTC
CWE
- CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Assigner
References
3 references
| URL | Tags |
|---|---|
| https://github.com/git/git/security/advisories/GH… | x_refsource_CONFIRM |
| https://github.com/git/git/commit/c867e4fa180bec4… | x_refsource_MISC |
| https://security.gentoo.org/glsa/202312-15 |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| git | git |
Affected:
>= 2.39.0, < 2.39.2
Affected: >= 2.38.0, < 2.38.4 Affected: >= 2.37.0, < 2.37.6 Affected: >= 2.36.0, < 2.36.5 Affected: >= 2.35.0, < 2.35.7 Affected: >= 2.34.0, < 2.34.7 Affected: >= 2.33.0, < 2.33.7 Affected: >= 2.32.0, < 2.32.6 Affected: >= 2.31.0, < 2.31.7 Affected: < 2.30.8 |
{
"containers": {
"adp": [
{
"providerMetadata": {
"dateUpdated": "2024-08-02T10:49:07.949Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"name": "https://github.com/git/git/security/advisories/GHSA-r87m-v37r-cwfh",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
],
"url": "https://github.com/git/git/security/advisories/GHSA-r87m-v37r-cwfh"
},
{
"name": "https://github.com/git/git/commit/c867e4fa180bec4750e9b54eb10f459030dbebfd",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/git/git/commit/c867e4fa180bec4750e9b54eb10f459030dbebfd"
},
{
"tags": [
"x_transferred"
],
"url": "https://security.gentoo.org/glsa/202312-15"
}
],
"title": "CVE Program Container"
},
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2023-23946",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2026-10-08T21:13:34.517515Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2026-10-08T21:14:08.741Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "git",
"vendor": "git",
"versions": [
{
"status": "affected",
"version": "\u003e= 2.39.0, \u003c 2.39.2"
},
{
"status": "affected",
"version": "\u003e= 2.38.0, \u003c 2.38.4"
},
{
"status": "affected",
"version": "\u003e= 2.37.0, \u003c 2.37.6"
},
{
"status": "affected",
"version": "\u003e= 2.36.0, \u003c 2.36.5"
},
{
"status": "affected",
"version": "\u003e= 2.35.0, \u003c 2.35.7"
},
{
"status": "affected",
"version": "\u003e= 2.34.0, \u003c 2.34.7"
},
{
"status": "affected",
"version": "\u003e= 2.33.0, \u003c 2.33.7"
},
{
"status": "affected",
"version": "\u003e= 2.32.0, \u003c 2.32.6"
},
{
"status": "affected",
"version": "\u003e= 2.31.0, \u003c 2.31.7"
},
{
"status": "affected",
"version": "\u003c 2.30.8"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Git, a revision control system, is vulnerable to path traversal 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. By feeding a crafted input to `git apply`, a path outside the working tree can be overwritten as the user who is running `git apply`. 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. As a workaround, use `git apply --stat` to inspect a patch before applying; avoid applying one that creates a symbolic link and then creates a file beyond the symbolic link."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "NONE",
"baseScore": 6.2,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "NONE",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-22",
"description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2023-12-27T10:06:31.121Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/git/git/security/advisories/GHSA-r87m-v37r-cwfh",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/git/git/security/advisories/GHSA-r87m-v37r-cwfh"
},
{
"name": "https://github.com/git/git/commit/c867e4fa180bec4750e9b54eb10f459030dbebfd",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/git/git/commit/c867e4fa180bec4750e9b54eb10f459030dbebfd"
},
{
"url": "https://security.gentoo.org/glsa/202312-15"
}
],
"source": {
"advisory": "GHSA-r87m-v37r-cwfh",
"discovery": "UNKNOWN"
},
"title": "Git\u0027s `git apply` overwriting paths outside the working tree"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2023-23946",
"datePublished": "2023-02-14T19:48:00.554Z",
"dateReserved": "2023-01-19T21:12:31.362Z",
"dateUpdated": "2026-10-08T21:14:08.741Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}