{"id":"CVE-2023-23946","aliases":["CVE-2023-23946"],"related":[],"kind":"vulnerability","state":"published","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2023-02-14T19:48:00.554Z","modified":"2026-10-08T22:17:23.000Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":">= 2.39.0, < 2.39.2","status":"affected"},{"version":">= 2.38.0, < 2.38.4","status":"affected"},{"version":">= 2.37.0, < 2.37.6","status":"affected"},{"version":">= 2.36.0, < 2.36.5","status":"affected"},{"version":">= 2.35.0, < 2.35.7","status":"affected"},{"version":">= 2.34.0, < 2.34.7","status":"affected"},{"version":">= 2.33.0, < 2.33.7","status":"affected"},{"version":">= 2.32.0, < 2.32.6","status":"affected"},{"version":">= 2.31.0, < 2.31.7","status":"affected"},{"version":"< 2.30.8","status":"affected"}],"vendor":"git","product":"git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"2.30.8"},{"status":"affected","introduced":"2.31.0","fixed":"2.31.7"},{"status":"affected","introduced":"2.32.0","fixed":"2.32.6"},{"status":"affected","introduced":"2.33.0","fixed":"2.33.7"},{"status":"affected","introduced":"2.34.0","fixed":"2.34.7"},{"status":"affected","introduced":"2.35.0","fixed":"2.35.7"},{"status":"affected","introduced":"2.36.0","fixed":"2.36.5"},{"status":"affected","introduced":"2.37.0","fixed":"2.37.6"},{"status":"affected","introduced":"2.38.0","fixed":"2.38.4"},{"status":"affected","introduced":"2.39.0","fixed":"2.39.2"}],"vendor":"git-scm","product":"git","cpe":"cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/git/git/security/advisories/GHSA-r87m-v37r-cwfh","tags":["vendor-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/git/git/commit/c867e4fa180bec4750e9b54eb10f459030dbebfd","tags":["patch","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.gentoo.org/glsa/202312-15","tags":["x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-08T21:13:34.517Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-23946","url":"https://www.cve.org/CVERecord?id=CVE-2023-23946","licence":"CVE Terms of Use","modified":"2026-10-08T21:14:08.741Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-23946","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-23946","licence":"Public domain","modified":"2026-10-08T22:17:23.000Z"}],"updatedAt":"2026-11-25T22:58:22.019Z","epss":{"score":0.01145,"percentile":0.67661,"date":"2026-12-01T12:00:22.000Z"}}