{"answers":{"affected":"3 open source packages ship an affected version, including github.com/github/git-sizer.","exploited":"There is no known exploitation of GHSA-57q7-rxqq-7vgp in the wild and no public exploit code.","fix":"Upgrade github.com/github/git-sizer to 1.4.0 or later.","what":"GHSA-57q7-rxqq-7vgp is a command injection vulnerability in github.com/github/git-sizer, published on 15 Feb 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-57q7-rxqq-7vgp and fix it if it is affected.\n\nWhat it is: GHSA-57q7-rxqq-7vgp is a command injection vulnerability in github.com/github/git-sizer, published on 15 Feb 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-57q7-rxqq-7vgp in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/github/git-sizer (Go): affected all versions; fixed in 1.4.0\n- github.com/github/git-sizer (Go): affected all versions; fixed in 1.4.0\n- github.com/github/git-sizer (Go): affected all versions; fixed in 1.4.0\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/GHSA-57q7-rxqq-7vgp/ (Markdown: https://insights.sbomify.com/GHSA-57q7-rxqq-7vgp/index.md)","id":"GHSA-57q7-rxqq-7vgp","markdown":"https://insights.sbomify.com/GHSA-57q7-rxqq-7vgp/index.md","name":"GHSA-57q7-rxqq-7vgp","record":{"aliases":["GO-2022-0424"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Go git analysis tool","requires_auth":"none","summary":"An attacker can execute arbitrary code on Windows by tricking a user into running git-sizer on a malicious repository containing a fake git executable.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nOn Windows, if `git-sizer` is run against a non-bare repository, and that repository has an executable called `git.exe`, `git.bat`, etc., then that executable might be run by `git-sizer` rather than the system `git` executable. An attacker could try to use social engineering to get a victim to run `git-sizer` against a hostile repository and thereby get the victim to run arbitrary code.\n\nOn Linux or other Unix-derived platforms, a similar problem could occur if the user's `PATH` has the current directory before the path to the standard `git` executable, but this is would be a very unusual configuration that has been known for decades to lead to all kinds of security problems.\n\n### Patches\nUsers should update to git-sizer v1.4.0\n\n### Workarounds\nIf you are on Windows, then either\n* Don't run `git-sizer` against a repository that might contain hostile code, or, if you must…\n* Run `git-sizer` against a bare clone of the hostile repository, or, if that is not possible…\n* Make sure that the hostile repository doesn't have an executable in its top-level directory before running `git-sizer`.\n\nIf you are on Linux or other Unix-based system, then (for myriad reasons!) don't add the current directory to your `PATH`.\n\n### References\n* [Command PATH security in Go](https://blog.golang.org/path-security)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the `git-sizer` project](https://github.com/github/git-sizer).\n* Email us at [GitHub support](mailto:support@github.com).","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"On Windows, `git-sizer` might run a `git` executable within the repository being analyzed","id":"GHSA-57q7-rxqq-7vgp","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"command_injection","year":"2022"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.4.0"],"introduced":["0"],"last_affected":[],"package":"github.com/github/git-sizer","purl":null,"source":"GHSA-57q7-rxqq-7vgp"},{"ecosystem":"Go","fixed":["1.4.0"],"introduced":["0"],"last_affected":[],"package":"github.com/github/git-sizer","purl":"pkg:golang/github.com/github/git-sizer","source":"GHSA-57q7-rxqq-7vgp"},{"ecosystem":"Go","fixed":["1.4.0"],"introduced":["0"],"last_affected":[],"package":"github.com/github/git-sizer","purl":"pkg:golang/github.com/github/git-sizer","source":"GO-2022-0424"}],"products":null,"published":"2022-02-15","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can execute arbitrary code on Windows by tricking a user into running git-sizer on a malicious repository containing a fake git executable.","url":"https://insights.sbomify.com/GHSA-57q7-rxqq-7vgp/"}