CVE-2023-25652

"git apply --reject" partially-controlled arbitrary file write

HIGH
7.5
CVSS Score
Published: April 25, 2023 at 07:17 PM UTC
Updated: June 17, 2026 at 05:41 AM UTC
3 products affected across 3 vendorsFedoraGitGit

Using git by git?

Get instant alerts when new vulnerabilities affect git - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 52%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.30.92.31.0 ≤ v < 2.31.82.32.0 ≤ v < 2.32.72.33.0 ≤ v < 2.33.82.34.0 ≤ v < 2.34.82.35.0 ≤ v < 2.35.82.36.0 ≤ v < 2.36.62.37.0 ≤ v < 2.37.72.38.0 ≤ v < 2.38.52.39.0 ≤ v < 2.39.32.40.0
Affected range stops below 2.30.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.31.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.32.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.33.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.34.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.35.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.36.6, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.37.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.38.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.39.3, so it looks safe — our inference, not a vendor statement
Git· Gitrubygems
60%
v < 2.30.9v < 2.31.8v < 2.32.7v < 2.33.8v < 2.34.8v < 2.35.8v < 2.36.6v < 2.37.7v < 2.38.5v < 2.39.3v < 2.40.1
Affected range stops below 2.30.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.31.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.32.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.33.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.34.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.35.8, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.36.6, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.37.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.38.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.39.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.40.1, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-22NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card