{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-23521 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2022-23521 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-23521 and fix it if it is affected.\n\nWhat it is: CVE-2022-23521 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-23521 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-23521/ (Markdown: https://insights.sbomify.com/CVE-2022-23521/index.md)","id":"CVE-2022-23521","markdown":"https://insights.sbomify.com/CVE-2022-23521/index.md","name":"CVE-2022-23521","record":{"aliases":["ALPINE-CVE-2022-23521","AZL-13024","CLEANSTART-2026-GJ10075","DEBIAN-CVE-2022-23521","GHSA-c738-c5qq-xg89","UBUNTU-CVE-2022-23521"],"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":"Attackers can achieve remote code execution via integer overflows in Git's gitattributes parsing triggered by crafted repository files.","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. 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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"gitattributes parsing integer overflow in git","id":"CVE-2022-23521","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"integer_overflow","year":"2022"},"n_packages":0,"n_references":3,"next":{"headline":"Arbitrary File Write when Extracting Tarballs retrieved from a remote location using in mindsdb","id":"CVE-2022-23522"},"packages":[],"prev":{"headline":"rails-html-sanitizer contains an incomplete fix for an XSS vulnerability","id":"CVE-2022-23520"},"products":["git"],"published":"2023-01-17","related":[{"cvss_score":9.8,"headline":"Integer overflow in `git archive`, `git log --format` leading to RCE in git","id":"CVE-2022-41903","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)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["git"]},"summary":"Attackers can achieve remote code execution via integer overflows in Git's gitattributes parsing triggered by crafted repository files.","url":"https://insights.sbomify.com/CVE-2022-23521/"}