{"answers":{"affected":"2 open source packages ship an affected version, including squizlabs/php_codesniffer.","exploited":"There is no known exploitation of GHSA-mhfv-8rc9-w38c in the wild and no public exploit code.","fix":"Upgrade squizlabs/php_codesniffer to 2.8.1 or later.","what":"GHSA-mhfv-8rc9-w38c is a command injection vulnerability in squizlabs/php_codesniffer, published on 26 Mar 2022."},"fix_prompt":"Check this codebase for GHSA-mhfv-8rc9-w38c and fix it if it is affected.\n\nWhat it is: GHSA-mhfv-8rc9-w38c is a command injection vulnerability in squizlabs/php_codesniffer, published on 26 Mar 2022. \nExploitation: There is no known exploitation of GHSA-mhfv-8rc9-w38c in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- squizlabs/php_codesniffer (Packagist): affected from 1.0.0; fixed in 2.8.1\n- squizlabs/php_codesniffer (Packagist): affected from 1.0.0; fixed in 2.8.1\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-mhfv-8rc9-w38c/ (Markdown: https://insights.sbomify.com/GHSA-mhfv-8rc9-w38c/index.md)","id":"GHSA-mhfv-8rc9-w38c","markdown":"https://insights.sbomify.com/GHSA-mhfv-8rc9-w38c/index.md","name":"GHSA-mhfv-8rc9-w38c","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"unknown","non_default_config":false,"product_category":"PHP library","requires_auth":"unknown","summary":"Attackers can execute arbitrary shell commands due to insufficient escaping of filenames and configuration settings in PHP library functions.","user_interaction":"unknown","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":"Uses of shell_exec() and exec() were not escaping filenames and configuration settings in most cases","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Arbitrary shell execution","id":"GHSA-mhfv-8rc9-w38c","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"command_injection","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["2.8.1"],"introduced":["1.0.0"],"last_affected":[],"package":"squizlabs/php_codesniffer","purl":null,"source":"GHSA-mhfv-8rc9-w38c"},{"ecosystem":"Packagist","fixed":["2.8.1"],"introduced":["1.0.0"],"last_affected":[],"package":"squizlabs/php_codesniffer","purl":"pkg:composer/squizlabs/php_codesniffer","source":"GHSA-mhfv-8rc9-w38c"}],"products":null,"published":"2022-03-26","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary shell commands due to insufficient escaping of filenames and configuration settings in PHP library functions.","url":"https://insights.sbomify.com/GHSA-mhfv-8rc9-w38c/"}