{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-41903 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2022-41903 is a critical vulnerability in git, published on 17 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-41903 and fix it if it is affected.\n\nWhat it is: CVE-2022-41903 is a critical vulnerability in git, published on 17 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-41903 in the wild and no public exploit code.\n\nAffected product: git. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-41903/ (Markdown: https://insights.sbomify.com/CVE-2022-41903/index.md)","id":"CVE-2022-41903","markdown":"https://insights.sbomify.com/CVE-2022-41903/index.md","name":"CVE-2022-41903","record":{"aliases":["ALPINE-CVE-2022-41903","AZL-13026","CLEANSTART-2026-NZ77046","DEBIAN-CVE-2022-41903","GHSA-475x-2q3q-hvwq","UBUNTU-CVE-2022-41903"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Git version control","requires_auth":"none","summary":"An integer overflow in Git's log formatting allows arbitrary code execution when processing crafted commit formats or archives.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"git","vendor":"git-scm"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"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`.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2023-01-26","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-01-26T08:34:53Z","kind":"github_poc","ref":"https://github.com/sondermc/git-cveissues","stars":0,"title":"vulnerabilities, CVE-2022-41903, and CVE-2022-23521, that affect versions 2.39 and older. Git for Windows was also patched to address an additional, Windows-specific issue known as CVE-2022-41953."}],"tier":"poc_unverified"},"has_fix":true,"headline":"Integer overflow in `git archive`, `git log --format` leading to RCE in git","id":"CVE-2022-41903","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"integer_overflow","year":"2022"},"n_packages":0,"n_references":5,"next":{"headline":"Element iOS is vulnerable due to missing decoration for events decrypted with untrusted Megolm sessions","id":"CVE-2022-41904"},"packages":[],"prev":{"headline":"Out of bounds write in grappler in Tensorflow","id":"CVE-2022-41902"},"products":["git"],"published":"2023-01-17","related":[{"cvss_score":9.8,"headline":"gitattributes parsing integer overflow in git","id":"CVE-2022-23521","kev_date_added":null,"published":"2023-01-17"},{"cvss_score":9.8,"headline":"Security feature bypass in Git","id":"CVE-2019-1353","kev_date_added":null,"published":"2020-01-24"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2016-2315","kev_date_added":null,"published":"2016-04-08"},{"cvss_score":9.8,"headline":"Integer overflow in n/a","id":"CVE-2016-2324","kev_date_added":null,"published":"2016-04-08"},{"cvss_score":8.8,"headline":"Command injection in Git","id":"CVE-2019-1387","kev_date_added":null,"published":"2019-12-18"},{"cvss_score":8.8,"headline":"Command injection in n/a","id":"CVE-2017-1000117","kev_date_added":null,"published":"2017-10-04"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-10","vendors":["git"]},"summary":"An integer overflow in Git's log formatting allows arbitrary code execution when processing crafted commit formats or archives.","url":"https://insights.sbomify.com/CVE-2022-41903/"}