CVE-2026-58474
published high CVSS 4.0 · 8.6whichllm < 0.5.16 Code Injection via run and snippet commands
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Andyyyy64 | — | whichllm0 to < 0.5.16 · Other versions: affected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.6 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Andyyyy64 | whichllm | 0 to < 0.5.16 (affected · semver)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
4- Patch Commit https://github.com/Andyyyy64/whichllm/commit/77e8dc9e8b45212c694d631d758623e17a00859e
- Pull Request https://github.com/Andyyyy64/whichllm/pull/147
- whichllm v0.5.16 Release Notes https://github.com/Andyyyy64/whichllm/releases/tag/v0.5.16
- https://www.vulncheck.com/advisories/whichllm-code-injection-via-run-and-snippet-commands
Provider assertions
2VulnCheck · cna
whichllm < 0.5.16 Code Injection via run and snippet commands
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- dda654677b716841fc3629f6030999a66f44c53992e5657981032d2748c5e22c
- Ingested
- 23 Sep 2026, 09:22:29 UTC
- Source record
- Official CVE record