CVE-2022-23521 | gitattributes parsing integer overflow in git

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.

Published: 2023-01-17 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-23521 is rated High Risk (78.8/100): CVSS Critical severity, with high exploitation likelihood (EPSS 56.33%, 99th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. EPSS rose +46.90% over the last day, indicating growing attacker interest. Mandatory action: High exploitation likelihood—assess exposure and prioritize 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-2022-23521

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-06-15 9.44% 56.33% +46.90%
2 2026-05-22 12.29% 9.44% -2.85%
3 2026-03-15 12.29%

Full EPSS history (65 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-23521

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 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:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 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:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]

Weakness enumeration for CVE-2022-23521

OS Trackers for CVE-2022-23521

vendor priority summary link
alpine CVE-2022-23521: 1 source package rows (git); 58 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 51. https://security.alpinelinux.org/vuln/CVE-2022-23521
debian not yet assigned CVE-2022-23521 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-2022-23521
gentoo high CVE-2022-23521: 1 GLSA(s) (202312-15), 1 atom(s) (dev-vcs/git); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-23521
redhat high https://access.redhat.com/security/cve/CVE-2022-23521
suse high CVE-2022-23521 severity important: SUSE including 168 source package names (1.18-19.18:git-core-2.35.3-150300.10.21.1, 1.20-openssl:git-core-2.35.3-150300.10.21.1, …), 540 product×package rows across 75 product lines (Container bci/golang, Container bci/nodejs, … (75 product lines)): Fixed 462, Known Not Affected 78. https://www.suse.com/security/cve/CVE-2022-23521/
ubuntu medium CVE-2022-23521 medium priority: Ubuntu including 1 source packages (git), 8 status rows across 8 suites (bionic, focal, jammy, kinetic, lunar, trusty, upstream, xenial): released 7, needs-triage 1. https://ubuntu.com/security/CVE-2022-23521

Affected software / configurations for CVE-2022-23521

Vendor Product Version Raw CPE
git-scm git <= 2.30.6 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.31.0, <= 2.31.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.32.0, <= 2.32.4 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.33.0, <= 2.33.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.34.0, <= 2.34.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.35.0, <= 2.35.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.36.0, <= 2.36.3 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.37.0, <= 2.37.4 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.38.0, <= 2.38.2 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git 2.39.0 cpe:2.3:a:git-scm:git:2.39.0:*:*:*:*:*:*:*

References for CVE-2022-23521

cvelogic Threat Intelligence