Skip to content

CVE-2026-58474 whichllm < 0.5.16 Code Injection via run and snippet commands

HighCVSS 8.6 EPSS 0.86%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total

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.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
andyyyy64/whichllm < 0.5.16 0.5.16 Fixed

Affected products

ProductAffected versionsFixed in
andyyyy64/whichllm < 0.5.16 0.5.16

References