{"schemaVersion":3,"id":"CVE-2022-41903","aliases":["ALPINE-CVE-2022-41903","UBUNTU-CVE-2022-41903","DEBIAN-CVE-2022-41903","CGA-mvxp-rpg7-65xg","CGA-wh8v-26rh-7874"],"status":"published","duplicateOf":null,"title":null,"description":"Git is distributed revision control system. `git log` can display commits in an arbitrary format using its `--format` specifiers. This functionality is also exposed to `git archive` via the `export-subst` gitattribute. When processing the padding operators, there is a integer overflow in `pretty.c::format_and_pad_commit()` where a `size_t` is stored improperly as an `int`, and then added as an offset to a `memcpy()`. This overflow can be triggered directly by a user running a command which invokes the commit formatting machinery (e.g., `git log --format=...`). It may also be triggered indirectly through git archive via the export-subst mechanism, which expands format specifiers inside of files within the repository during a git archive. This integer overflow can result in arbitrary heap writes, which may result in arbitrary 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. Users who are unable to upgrade should disable `git archive` in untrusted repositories. If you expose git archive via `git daemon`, disable it by running `git config --global daemon.uploadArch false`.","dates":{"published":"2023-01-17T22:17:16.123Z","modified":"2025-03-10T21:21:50.039Z","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.44268,"percentile":0.98748,"severity":"high","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.44268},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.44268,"percentile":0.98748}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.44268,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.44268,"percentile":0.98748}]},"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-475x-2q3q-hvwq","label":"github.com/git/git/security/advisories/GHSA-475x-2q3q-hvwq","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","Release Notes","Third Party Advisory"]},{"url":"https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#_export_subst","label":"git-scm.com/book/en/v2/Customizing-Git-Git-Attributes","hostname":"git-scm.com","tags":["X Refsource MISC","WEB","Vendor Advisory"]},{"url":"https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emltltNgttruncltruncmtruncem","label":"git-scm.com/docs/pretty-formats","hostname":"git-scm.com","tags":["X Refsource MISC","WEB","Vendor 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-41903","label":"security.alpinelinux.org/vuln/CVE-2022-41903","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-41903","label":"ubuntu.com/security/CVE-2022-41903","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-41903","label":"www.cve.org/CVERecord?id=CVE-2022-41903","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-41903","label":"security-tracker.debian.org/tracker/CVE-2022-41903","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41903.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41903.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41903","label":"nvd.nist.gov/vuln/detail/CVE-2022-41903","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-2VQ3-CHQ9-2R3W","CGA-3PG6-25QW-9MHF","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:16.123Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-03-10T21:21:50.039Z","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-19T22:51:40.829Z","stale":false,"partial":false}}