9.8

CVE-2022-23521: git-scm git Integer Overflow or Wraparound

CVSS: 9.8v3.1CriticalModified
AliasesALPINE-CVE-2022-23521UBUNTU-CVE-2022-23521DEBIAN-CVE-2022-23521
Published 17-01-2023Last modified 13-02-2025

Vulnerability summary

CVE-2022-23521 is a critical (CVSS 9.8) Integer Overflow or Wraparound vulnerability in git-scm git. EPSS estimates a 56.33% chance of exploitation in the next 30 days, higher than 99% of scored vulnerabilities.

Overall risk
70/100
0100
High · default modelHow is this calculated?
CVSS score
9.8/10
010
Critical · v3.1 (CVE.org)
EPSS score
56.33%
0%100%
Critical · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 20 · Related 10

Timeline

  1. 17-01-2023
    PublishedVulnerability first disclosed.
  2. 13-02-2025
    Last modifiedVulnerability information updated.

Description

Git is distributed revision control system. gitattributes are a mechanism to allow defining attributes for paths. These attributes can be defined by adding a `.gitattributes` file to the repository, which contains a set of file patterns and the attributes that should be set for paths matching this pattern. When parsing gitattributes, multiple integer overflows can occur when there is a huge number of path patterns, a huge number of attributes for a single pattern, or when the declared attribute names are huge. These overflows can be triggered via a crafted `.gitattributes` file that may be part of the commit history. Git silently splits lines longer than 2KB when parsing gitattributes from a file, but not when parsing them from the index. Consequentially, the failure mode depends on whether the file exists in the working tree, the index or both. This integer overflow can result in arbitrary heap reads and writes, which may result in remote code execution. The problem has been patched in the versions published on 2023-01-17, going back to v2.30.7. Users are advised to upgrade. There are no known workarounds for this issue.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

56.33%

Chance of exploitation in the next 30 days

Percentile

99%

Versus all other CVEs

30-day change

0.00 pp

From 56.33% on 18-09-2026

18-09-202618-10-2026
EPSS score
56.33%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Alpine1 product
  • git≥ 2.31.0, < 2.32.5-r0 | ≥ 2.31.0, < 2.34.6-r0 | ≥ 2.31.0, < 2.36.4-r0 | ≥ 2.31.0, < 2.38.3-r0 | ≥ 2.31.0, < 2.39.1-r0
Chainguard1 product
  • git< 2.39.1-r0
Debian1 product
  • git< 1:2.39.1-0.1
Git1 product
  • git< 2.30.7 | ≥ 2.31.0, < 2.31.6 | ≥ 2.32.0, < 2.32.5 | ≥ 2.33.0, < 2.33.6 | ≥ 2.34.0, < 2.34.6 | ≥ 2.35.0, < 2.35.6 | ≥ 2.36.0, < 2.36.4 | ≥ 2.37.0, < 2.37.5 | ≥ 2.38.0, < 2.38.3 | = 2.39.0
Git-scm1 product
  • git≤ 2.30.6 | ≥ 2.31.0, ≤ 2.31.5 | ≥ 2.32.0, ≤ 2.32.4 | ≥ 2.33.0, ≤ 2.33.5 | ≥ 2.34.0, ≤ 2.34.5 | ≥ 2.35.0, ≤ 2.35.5 | ≥ 2.36.0, ≤ 2.36.3 | ≥ 2.37.0, ≤ 2.37.4 | ≥ 2.38.0, ≤ 2.38.2 | 2.39.0
Ubuntu1 product
  • git< 1:1.9.1-1ubuntu0.10+esm1 | < 1:2.7.4-0ubuntu1.10+esm4 | < 1:2.17.1-1ubuntu0.15 | < 1:2.25.1-1ubuntu3.8 | < 1:2.34.1-1ubuntu1.6
Wolfi1 product
  • git< 2.39.1-r0

7 vendors · 7 products

References

13 links
Show all 13 references