{"id":"CVE-2026-58474","state":"PUBLISHED","title":"whichllm < 0.5.16 Code Injection via run and snippet commands","description":"whichllm before 0.5.16 contains a code injection vulnerability in the run and snippet commands that allows a remote attacker who controls a HuggingFace repository to achieve arbitrary code execution by crafting a malicious GGUF filename containing double quotes or other special characters. The script generation function in cli.py interpolates HuggingFace-derived values, including GGUF variant filenames from the Hub API siblings rfilename field, directly into Python source code without escaping, allowing the crafted filename to break out of the generated string literal and execute injected code on the user's machine before any model download occurs.","publishedAt":"2026-08-26T17:49:04.041Z","updatedAt":"2026-08-29T11:47:31.365Z","severity":{"score":8.6,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck"},"assigner":"VulnCheck","products":["Andyyyy64 whichllm"],"affected":[{"vendor":"Andyyyy64","product":"whichllm","packageURL":"pkg:github/Andyyyy64/whichllm","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"0.5.16","versionType":"semver"}],"repo":"https://github.com/Andyyyy64/whichllm"}],"references":["https://github.com/Andyyyy64/whichllm/releases/tag/v0.5.16","https://github.com/Andyyyy64/whichllm/pull/147","https://github.com/Andyyyy64/whichllm/commit/77e8dc9e8b45212c694d631d758623e17a00859e","https://www.vulncheck.com/advisories/whichllm-code-injection-via-run-and-snippet-commands"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/58xxx/CVE-2026-58474.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-58474","state":"PUBLISHED","datePublished":"2026-08-26T17:49:04.041Z","dateUpdated":"2026-08-29T11:47:31.365Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-06-30T20:20:33.790Z"},"containers":{"cna":{"title":"whichllm < 0.5.16 Code Injection via run and snippet commands","descriptions":[{"lang":"en","value":"whichllm before 0.5.16 contains a code injection vulnerability in the run and snippet commands that allows a remote attacker who controls a HuggingFace repository to achieve arbitrary code execution by crafting a malicious GGUF filename containing double quotes or other special characters. The script generation function in cli.py interpolates HuggingFace-derived values, including GGUF variant filenames from the Hub API siblings rfilename field, directly into Python source code without escaping, allowing the crafted filename to break out of the generated string literal and execute injected code on the user's machine before any model download occurs."}],"affected":[{"vendor":"Andyyyy64","product":"whichllm","packageURL":"pkg:github/Andyyyy64/whichllm","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"0.5.16","versionType":"semver"}],"repo":"https://github.com/Andyyyy64/whichllm"}],"references":[{"url":"https://github.com/Andyyyy64/whichllm/releases/tag/v0.5.16","name":"whichllm v0.5.16 Release Notes","tags":["release-notes"]},{"url":"https://github.com/Andyyyy64/whichllm/pull/147","name":"Pull Request","tags":["issue-tracking","patch"]},{"url":"https://github.com/Andyyyy64/whichllm/commit/77e8dc9e8b45212c694d631d758623e17a00859e","name":"Patch Commit","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/whichllm-code-injection-via-run-and-snippet-commands","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"ACTIVE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.6,"vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","version":"3.1","baseSeverity":"HIGH","baseScore":8.8,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","lang":"en","description":"Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-08-29T11:47:31.365Z"},"tags":["x_open-source"],"datePublic":"2026-07-19T00:00:00.000Z","credits":[{"lang":"en","value":"hannibal-lee","type":"finder"},{"lang":"en","value":"hayato1121","type":"finder"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"vulncheck"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-26T18:54:39.546723Z","id":"CVE-2026-58474","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-26T19:03:48.938Z"}}]}}}