VDB

CVE-2023-25652

CVE-2023-25652 PUBLISHED CVSS 7.5 HIGH

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

Reported by github_m · Published April 25, 2023

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
git-daemonAmazon Linux2.40.1-1.amzn2023.0.1
git-subtreeAmazon Linux2.40.1-1.amzn2023.0.1, 2.40.1-1.amzn2.0.1
gitwebAmazon Linux2.40.1-1.amzn2023.0.1, 2.40.1-1.amzn2.0.1
git-allAmazon Linux2.40.1-1.amzn2023.0.1, 2.40.1-1.amzn2.0.1
git-emailAmazon Linux2.40.1-1.amzn2023.0.1, 2.40.1-1.amzn2.0.1
perl-Git-SVNAmazon Linux2.40.1-1.amzn2023.0.1, 2.40.1-1.amzn2.0.1
gitAmazon Linux2.40.1-1.amzn2023.0.1, 2.40.1-1.amzn2.0.1
git-guiAmazon Linux2.40.1-1.amzn2.0.1
git-instawebAmazon Linux2.40.1-1.amzn2023.0.1
gitWolfi2.40.1-r0
git-coreAmazon Linux2.40.1-1.amzn2023.0.1
git-cvsAmazon Linux2.40.1-1.amzn2.0.1

5 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected products

VendorProductVersions
gitgit< 2.30.9, >= 2.31.0, < 2.31.8, >= 2.32.0, < 2.32.7
amazon:2023git-daemon0
amazon:2git-subtree0
amazon:2023gitweb0
amazon:2023git-all0
amazon:2023git-email0
amazon:2023git-subtree0
amazon:2023perl-Git-SVN0
amazon:2perl-Git-SVN0
amazon:2023git0
amazon:2git-gui0
amazon:2git-email0
amazon:2023git-instaweb0
wolfigit0
amazon:2023git-core0
amazon:2git-cvs0
amazon:2git-svn0
amazon:2gitk0
amazon:2git0
amazon:2git-credential-libsecret0

…and 19 more

Timeline

  • Apr 25, 2023 CVE Published
  • Apr 26, 2023 EPSS Score (30 in total, the first dated here)
  • Feb 8, 2024 PoC Published
  • Nov 4, 2025 CVE Updated
  • Feb 20, 2026 Security Advisory (29 in total, the first dated here)
  • Mar 21, 2026 Distribution Patch (24 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-25652
vulnetix vdb fixes CVE-2023-25652

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-25652/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›