Skip to main content
EPSS 0.9%top 43%

CVE-2026-58474: Improper Control of Generation of Code ('Code Injection') in Andyyyy64 whichllm

0
High
VulnerabilityCVE-2026-58474cvecve-2026-58474
Published: 08/26/2026 (08/26/2026, 17:49:04 UTC)
Source: CVE Database V5
Vendor/Project: Andyyyy64
Product: whichllm

Description

whichllm versions before 0.5.16 contain a code injection vulnerability in the run and snippet commands. This flaw allows a remote attacker controlling a HuggingFace repository to execute arbitrary code by crafting a malicious GGUF filename with special characters. The vulnerability arises because the script generation function in cli.py directly interpolates unescaped HuggingFace-derived values into Python source code, enabling code injection before any model download occurs.

CVSS v4.0

Score 8.6high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Andyyyy64

whichllm

Affected versions
>=0 <0.5.16
GitHub Actionsmore threats →cve
whichllm
pkg:github/whichllm
Affected versions
>=0 <0.5.16

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/09/2026, 17:07:32 UTC

Technical Analysis

CVE-2026-58474 is a code injection vulnerability in whichllm prior to version 0.5.16. The vulnerability exists in the run and snippet commands where the script generation function (cli.py) interpolates values derived from the HuggingFace Hub API, specifically GGUF variant filenames from the siblings rfilename field, directly into Python source code without proper escaping. An attacker controlling a HuggingFace repository can craft a malicious GGUF filename containing double quotes or other special characters to break out of the string literal context and inject arbitrary code. This code executes on the user's machine before any model download is initiated, allowing remote code execution.

Potential Impact

A remote attacker who controls a HuggingFace repository can exploit this vulnerability to achieve arbitrary code execution on the victim's machine without requiring privileges or user interaction beyond invoking the vulnerable commands. This can lead to full compromise of the affected system. The CVSS 4.0 score is 8.6 (high severity), reflecting the network attack vector, low complexity, no privileges required, but requiring user interaction and resulting in high confidentiality, integrity, and availability impact.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid running the vulnerable run and snippet commands with untrusted HuggingFace repositories or GGUF filenames. Validate and sanitize inputs derived from external sources before use in code generation contexts.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-06-30T20:20:33.790Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a8f2b77acd9273b49385ca1

Added to database: 08/26/2026, 18:07:51 UTC

Last enriched: 09/09/2026, 17:07:32 UTC

Last updated: 10/10/2026, 18:48:20 UTC

Views: 94

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses