CVE-2026-58474 json
whichllm < 0.5.16 Code Injection via run and snippet commands
published 2mo ago modified last mo. also EUVD-2026-66642
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 58%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Andyyyy64 whichllm 0.5.16
- github.com/Andyyyy64/whichllm@77e8dc9 commit
- github.com/Andyyyy64/whichllm#147 pull request
- github.com/Andyyyy64/whichllm/releases/tag/v0.5.16 release
Is CVE-2026-58474 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2mo ago
Exploit prediction
0.86% chance of exploitation in the next 30 days, higher than 58% of all scored CVEs (FIRST EPSS, 2026-11-11).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.6 | 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 |
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.6 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Inferred packages
No advisory lists a package for this vulnerability yet. The CVE names these as products and links their GitHub repository, and the package registry names the same repository, so they are probably the affected packages. Low confidence: the versions are the CVE’s own for the product, and a stack check reports the package as unchecked when there are none.
| ecosystem | package | repository | affected |
|---|---|---|---|
| pypi | whichllm | andyyyy64/whichllm | no versions given |
Affected products
- Andyyyy64 whichllm
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/Andyyyy64/whichllm/pull/147
issue-tracking, patch
-
github.com
/Andyyyy64/whichllm/commit/77e8dc9e8b45212c694d631d758623e17a00859e
patch
-
github.com
/Andyyyy64/whichllm/releases/tag/v0.5.16
release-notes
-
vulncheck.com
/advisories/whichllm-code-injection-via-run-and-snippet-commands
third-party-advisory
Sources
- CVE List CVE-2026-58474
- NVD CVE-2026-58474
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.