CVE-2023-25652 | "git apply --reject" partially-controlled arbitrary file write

Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, by feeding specially crafted input to `git apply --reject`, a path outside the working tree can be overwritten with partially controlled contents (corresponding to the rejected hunk(s) from the given patch). A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid using `git apply` with `--reject` when applying patches from an untrusted source. Use `git apply --stat` to inspect a patch before applying; avoid applying one that create a conflict where a link corresponding to the `*.rej` file exists.

Published: 2023-04-25 Last update: 2025-11-04 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-25652 is rated Moderate Risk (60.9/100): CVSS High severity, with medium exploitation likelihood (EPSS 3.56%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-25652

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-26 3.39% 3.56% +0.17%
2 2026-04-19 1.85% 3.39% +1.54%
3 2026-02-28 1.85%

Full EPSS history (33 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-25652

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2023-25652

OS Trackers for CVE-2023-25652

vendor priority summary link
alpine high CVE-2023-25652: 1 source package rows (git); 68 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 61. https://security.alpinelinux.org/vuln/CVE-2023-25652
debian not yet assigned CVE-2023-25652 not yet assigned priority: Debian including 1 source packages (git), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2023-25652
gentoo high CVE-2023-25652: 1 GLSA(s) (202312-15), 1 atom(s) (dev-vcs/git); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-25652
redhat high https://access.redhat.com/security/cve/CVE-2023-25652
suse high CVE-2023-25652 severity important: SUSE including 163 source package names (1.20-openssl:git-core-2.35.3-150300.10.27.1, 1.21:git-core-2.35.3-150300.10.27.1, …), 522 product×package rows across 61 product lines (Container bci/golang, Container bci/nodejs, … (61 product lines)): Fixed 467, Known Not Affected 55. https://www.suse.com/security/cve/CVE-2023-25652/
ubuntu medium CVE-2023-25652 medium priority: Ubuntu including 1 source packages (git), 8 status rows across 8 suites (bionic, focal, jammy, kinetic, lunar, trusty, upstream, xenial): released 6, ignored 1, needs-triage 1. https://ubuntu.com/security/CVE-2023-25652

Affected software / configurations for CVE-2023-25652

Vendor Product Version Raw CPE
git-scm git < 2.30.9 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.31.0, < 2.31.8 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.32.0, < 2.32.7 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.33.0, < 2.33.8 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.34.0, < 2.34.8 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.35.0, < 2.35.8 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.36.0, < 2.36.6 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.37.0, < 2.37.7 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.38.0, < 2.38.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.39.0, < 2.39.3 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git 2.40.0 cpe:2.3:a:git-scm:git:2.40.0:*:*:*:*:*:*:*
fedoraproject fedora 37 cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
fedoraproject fedora 38 cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*

References for CVE-2023-25652

URL Tags
http://www.openwall.com/lists/oss-security/2023/04/25/2 Mailing List Third Party Advisory
https://github.com/git/git/commit/18e2b1cfc80990719275d7b08e6e50f3e8cbc902 Patch
https://github.com/git/git/commit/668f2d53613ac8fd373926ebe219f2c29112d93e Patch
https://github.com/git/git/security/advisories/GHSA-2hvf-7c8p-28fx Vendor Advisory
https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
https://lists.fedoraproject.org/archives/list/[email protected]/message/BSXOGVVBJLYX26IAYX6PJSYQB36BREWH/
https://lists.fedoraproject.org/archives/list/[email protected]/message/PI7FZ4NNR5S5J5K6AMVQBH2JFP6NE4L7/ Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/[email protected]/message/RKOXOAZ42HLXHXTW6JZI4L5DAIYDTYCU/
https://lists.fedoraproject.org/archives/list/[email protected]/message/YFZWGQKB6MM5MNF2DLFTD7KS2KWPICKL/ Mailing List Third Party Advisory
https://security.gentoo.org/glsa/202312-15
https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html
cvelogic Threat Intelligence