{"schemaVersion":3,"id":"CVE-2022-23521","aliases":["ALPINE-CVE-2022-23521","UBUNTU-CVE-2022-23521","DEBIAN-CVE-2022-23521","CGA-g67f-w65x-gc3w","CGA-vg9m-2fc2-xv7w"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2023-01-17T22:17:17.765Z","modified":"2025-02-13T16:32:19.291Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Wolfi","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.56334,"percentile":0.99049,"severity":"critical","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.56334},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.56334,"percentile":0.99049}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.56334,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.56334,"percentile":0.99049}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-190","name":"Integer Overflow or Wraparound","description":"The product performs a calculation that can\n         produce an integer overflow or wraparound when the logic\n         assumes that the resulting value will always be larger than\n         the original value. This occurs when an integer value is\n         incremented to a value that is too large to store in the\n         associated representation. When this occurs, the value may\n         become a very small or negative number.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/190.html"}],"affected":[{"vendor":"alpine","product":"git","name":"git","label":"git","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/git","purlType":"apk","versions":[{"text":"≥ 2.31.0, < 2.32.5-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.34.6-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.36.4-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.38.3-r0","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.39.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 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","eol":null,"hubHref":null},{"vendor":"chainguard","product":"git","name":"git","label":"git","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/git","purlType":"apk","versions":[{"text":"< 2.39.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.39.1-r0","eol":null,"hubHref":null},{"vendor":"wolfi","product":"git","name":"git","label":"git","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/git","purlType":"apk","versions":[{"text":"< 2.39.1-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.39.1-r0","eol":null,"hubHref":null},{"vendor":"debian","product":"git","name":"git","label":"git","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/git","purlType":"deb","versions":[{"text":"< 1:2.39.1-0.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1:2.39.1-0.1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"git","name":"git","label":"git","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/git","purlType":"deb","versions":[{"text":"< 1:1.9.1-1ubuntu0.10+esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.7.4-0ubuntu1.10+esm4","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.17.1-1ubuntu0.15","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.25.1-1ubuntu3.8","noFixRecorded":false,"fixedIn":null},{"text":"< 1:2.34.1-1ubuntu1.6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 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","eol":null,"hubHref":null},{"vendor":"git-scm","product":"git","name":"git","label":"git","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 2.30.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, ≤ 2.31.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.32.0, ≤ 2.32.4","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.33.0, ≤ 2.33.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.34.0, ≤ 2.34.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.35.0, ≤ 2.35.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.36.0, ≤ 2.36.3","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.37.0, ≤ 2.37.4","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.38.0, ≤ 2.38.2","noFixRecorded":false,"fixedIn":null},{"text":"2.39.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 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","eol":null,"hubHref":"/vendor/git-scm/git"},{"vendor":"git","product":"git","name":"Git","label":"git","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 2.30.7","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.31.0, < 2.31.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.32.0, < 2.32.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.33.0, < 2.33.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.34.0, < 2.34.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.35.0, < 2.35.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.36.0, < 2.36.4","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.37.0, < 2.37.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 2.38.0, < 2.38.3","noFixRecorded":false,"fixedIn":null},{"text":"= 2.39.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 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","eol":null,"hubHref":"/vendor/git/git"}],"affectedCount":7,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/git/git/security/advisories/GHSA-c738-c5qq-xg89","label":"github.com/git/git/security/advisories/GHSA-c738-c5qq-xg89","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","Advisory","Third Party Advisory"]},{"url":"https://github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76","label":"github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76","hostname":"github.com","tags":["X Refsource MISC","FIX","Patch","Third Party Advisory"]},{"url":"https://security.gentoo.org/glsa/202312-15","label":"security.gentoo.org/glsa/202312-15","hostname":"security.gentoo.org","tags":["Advisory"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2022-23521","label":"security.alpinelinux.org/vuln/CVE-2022-23521","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-23521","label":"ubuntu.com/security/CVE-2022-23521","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-5810-1","label":"ubuntu.com/security/notices/USN-5810-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-5810-2","label":"ubuntu.com/security/notices/USN-5810-2","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-5810-3","label":"ubuntu.com/security/notices/USN-5810-3","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-5810-4","label":"ubuntu.com/security/notices/USN-5810-4","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23521","label":"www.cve.org/CVERecord?id=CVE-2022-23521","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-23521","label":"security-tracker.debian.org/tracker/CVE-2022-23521","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23521.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23521.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23521","label":"nvd.nist.gov/vuln/detail/CVE-2022-23521","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]}],"lineage":{"upstream":[],"downstream":["DLA-3282-1","DSA-5332-1","MGASA-2023-0033","OPENSUSE-SU-2024:12625-1","RHSA-2023:0596","RHSA-2023:0597","RHSA-2023:0599","RHSA-2023:0609","RHSA-2023:0610","RHSA-2023:0611","RHSA-2023:0627","RHSA-2023:0628","RHSA-2023:0978","RHSA-2023:1677","SUSE-SU-2023:0108-1","SUSE-SU-2023:0109-1","SUSE-SU-2023:0110-1","USN-5810-1","USN-5810-3","USN-5810-4"],"duplicates":[],"related":["CGA-8JHW-F94W-F3XG","CGA-CW44-2GX8-7X6M","OPENSUSE-SU-2024:12625-1","SUSE-SU-2023:0108-1","SUSE-SU-2023:0109-1","SUSE-SU-2023:0110-1","USN-5810-1","USN-5810-2","USN-5810-3","USN-5810-4"]},"timeline":[{"kind":"published","date":"2023-01-17T22:17:17.765Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-02-13T16:32:19.291Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T14:36:36.030Z","stale":false,"partial":false}}