{"id":"CVE-2022-23521","published":"2023-01-17T22:17:17Z","modified":"2025-02-13T16:32:19Z","title":"gitattributes parsing integer overflow in git","vendor":"git","product":"git","tier":"core","eol":null,"affectedVersions":[{"vendor":"git","product":"git","versions":["< 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"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The gitattributes parser in Git contains integer overflows that occur when handling a very large number of path patterns, a very large number of attributes for one pattern, or very large attribute names. An attacker can trigger these by supplying a crafted .gitattributes file included in repository commit history, which can lead to arbitrary heap reads and writes and possibly remote code execution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:13:38Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.56334,"percentile":0.99053,"date":"2026-10-31","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":null,"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"references":[{"url":"https://github.com/git/git/security/advisories/GHSA-c738-c5qq-xg89","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76","tags":["x_refsource_MISC"]},{"url":"https://security.gentoo.org/glsa/202312-15","tags":[]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2022-28555","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-28555","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2023-01-17","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2022-23521","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":26.7,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.81,"detail":"percentile 0.9905"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}