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.
Published: 2026-08-26
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

the vulnerability in whichllm before version 0.5.16 allows a malicious GGUF filename containing double quotes or other special characters to break out of a generated string literal and execute arbitrary code on the victim’s machine. the injection occurs during the script generation step in cli.py, where HuggingFace‑derived values are interpolated directly into Python source without escaping, leading to remote code execution before any model download occurs. the weakness is classified as CWE‑94: Improper Syntax Checking for Code Injection

Affected Systems

the affected product is whichllm from vendor Andyyyy64, affecting all installations with a version earlier than 0.5.16

Risk and Exploitability

the CVSS score of 8.6 indicates high severity, and the lack of an EPSS score means the exploit probability is not quantified. because the vulnerability requires a remote attacker to control a HuggingFace repository, the attack vector is indirect but feasible for malicious repository authors. the vulnerability is not listed in CISA KEV, yet it can be exploited by any user executing run or snippet commands with a crafted repository.

Generated by OpenCVE AI on August 26, 2026 at 19:44 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade whichllm to version 0.5.16 or later.
  • Restrict access to the HuggingFace hub so that only trusted repositories are used, or sign uploads to verify integrity.
  • If upgrading is not immediately possible, avoid running run or snippet commands against untrusted repositories until temporary mitigations are applied.

Generated by OpenCVE AI on August 26, 2026 at 19:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 26 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 26 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
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.
Title whichllm < 0.5.16 Code Injection via run and snippet commands
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.6, '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-26T19:03:48.938Z

Reserved: 2026-06-30T20:20:33.790Z

Link: CVE-2026-58474

cve-icon Vulnrichment

Updated: 2026-08-26T18:59:46.833Z

cve-icon NVD

Status : Received

Published: 2026-08-26T18:16:42.760

Modified: 2026-08-26T20:17:55.890

Link: CVE-2026-58474

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-26T19:45:07Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')