Skip to main content

Unsloth Zoo EUVDEUVD-2026-88318

| CVE-2026-93348 HIGH
Code Injection (CWE-94)
2026-09-28 VulnCheck GHSA-6crx-pj66-wf6h
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish malicious model with crafted config.json
  2. Delivery
    Victim loads model for training/inference
  3. Exploit
    Newline-injected model_type survives normalization
  4. Execution
    Payload terminates import, reaches exec()
  5. Impact
    Arbitrary Python runs as loading user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to load an attacker-controlled model (config.json with a malicious nested model_type) into Unsloth for training or inference - this is the UI:P/user-interaction gate. Affected: Unsloth Zoo 2025.9.9 before 2026.8.14, as used in Unsloth 2025.9.9 through 2026.8.19. No authentication is needed on the attacker side (PR:N); the trigger is simply that Unsloth processes the crafted config through get_transformers_model_type(), which lacked a character allowlist and allowed newlines/arbitrary source to survive normalization into the generated import statement. The practical limiting factor is trust: organizations that only load first-party/vetted models are not exposed, whereas pipelines that automatically ingest third-party or user-supplied models from public hubs are directly at risk. Fixed by upgrading unsloth_zoo to >=2026.8.14 (dependency floor bumped to 2026.8.15).

Impact

This is a genuine, high-priority issue for anyone running Unsloth/Unsloth Zoo against untrusted models. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H, score 8.6) describes a low-complexity, network-reachable, unauthenticated code-injection that yields arbitrary Python execution (CWE-94) as the loading user. The only real gate is UI:P - a victim must load a maliciously crafted model - which is exactly the normal workflow when pulling a model from a public hub, so the interaction requirement is weak in practice. No EPSS score, no CISA KEV listing, and no standalone public exploit are provided, so there is no evidence of active exploitation; however, the patch's own regression tests embed concrete working payloads (e.g. "llama'); import os; os.system('touch /tmp/pwned" and newline-based import termination), which sharply lowers the barrier to weaponization. The finding is credible and vendor-confirmed (reported by VulnCheck, patched across multiple PRs/commits). Note one metric tension worth verifying: the vendor sets VA:N (no availability impact), yet arbitrary code execution via exec() would normally permit availability compromise as well - I assess A:H. Net: treat as a real priority for AI/ML training pipelines that ingest third-party models, not a high-score-low-risk paper cut.

Exploit ScenarioDerived

An attacker publishes a malicious model repository on a model hub with a config.json whose nested model_type value contains a newline followed by attacker Python (e.g. terminating the generated import line and appending 'import os; os.system(...)'). A victim fine-tunes or runs inference on that model with Unsloth, and get_transformers_model_type() passes the unsanitized value into the compile path where it is executed via exec() in unsloth_compile_transformers(), giving code execution as the loading user. No standalone public exploit is listed, but the vendor's patch tests contain working injection payloads.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 28, 2026

Loading a malicious model into Unsloth Zoo 2025.9.9 through 2026.8.13 (as shipped in Unsloth 2025.9.9 through 2026.8.19) lets that model's config.json run arbitrary Python in the loading user's process, because a nested model_type value containing a newline escapes into an exec()-generated import statement. Exploitation requires the victim to load an attacker-controlled model for training or inference - a user-interaction gate, but no authentication on the attacker side (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H; vendor score 8.6). No public exploit code has been identified at time of analysis, and the practical exposure is concentrated in pipelines that automatically ingest third-party or user-supplied models from public hubs rather than those loading only vetted first-party checkpoints.

RemediationAI

Vendor-released patch: upgrade unsloth_zoo to 2026.8.14 or later; the accompanying Unsloth commit (92ee0207a38ebc8af1a0e678aa92d7e7d901ea0d) raises the dependency floor to unsloth_zoo>=2026.8.15 across its extras, so installing the current Unsloth release is the simplest path. The fixes land via https://github.com/unslothai/unsloth-zoo/pull/1083 and https://github.com/unslothai/unsloth-zoo/pull/1108, with the pinned dependency change shown in the Unsloth commit above; the VulnCheck advisory is at https://www.vulncheck.com/advisories/unsloth-zoo-code-injection-via-model-type-in-config-json. Where upgrading immediately is not possible, the highest-value compensating control is to stop loading untrusted models: restrict model sources to a vetted internal registry or an allowlisted set of hub repositories and treat any downloaded config.json as executable-adjacent input - the trade-off is that this blocks legitimate community and fine-tuned model workflows. Additionally, validate every model_type key in the top-level and nested config sections against ^[a-z0-9_]+$ before loading, and reject configs that fail; this is effective because the payload class relies on newlines and punctuation, but it is a manual control that must be re-applied to any config format variation. Avoid enabling trust_remote_code on untrusted checkpoints, which hands execution to the model repository independently of this bug. As a containment measure, run training and inference jobs in an isolated container or VM with no long-lived cloud credentials, read-only mounts, and restricted egress; this limits the blast radius of a successful injection but adds operational cost and can break jobs that need network access for downloads. Note the vulnerability is only triggered when a crafted model is actually loaded, so pre-scanning cached model directories for anomalous model_type strings provides useful detection without side effects.

Affected VersionsENISA

unsloth-zoo 2025.9.9 <2026.8.14
unsloth 2025.9.9 <2026.8.20

Affected Packages

euvd unsloth fix: 2026.8.20
euvd unsloth_zoo fix: 2026.8.14

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-94 (Improper Control of Generation of Code) arising from unvalidated string interpolation into generated Python. Unsloth Zoo's hf_utils.py get_transformers_model_type() recursively walks a model configuration - including nested sub-configs such as text_config and vision_config from composite architectures - and collects every model_type value it finds. Those values were then spliced into code: unsloth_compile_transformers() builds an import of the form transformers.models.{model_type}.modeling_{model_type}, and create_new_function() derives the compiled cache filename from the same string, so the value ultimately reaches an exec(). Normalization stripped some characters but did not enforce an allowlist, meaning a newline embedded in a nested model_type would terminate the generated import statement and allow arbitrary Python source to follow, executing as the loading user. The upstream fix in PR 1083 constrains the value to lowercase alphanumerics and underscores, rewrites '/' and '.' to '_' so path traversal cannot reach either the import path or the cache filename, treats empty nested sentinels (the PretrainedConfig default model_type of "") as unresolved rather than injected, and raises ValueError on invalid input. The same PR series replaces a related exec()-based weight assignment in set_additional_modules / _set_module_attribute with an explicit attribute walk that also handles numeric segments such as a.0.weight.

Know when Unsloth Zoo gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Remote, low-complexity, no attacker auth; requires the victim to load a malicious model (UI:R), and exec()-based RCE yields full C/I/A on the loading user's context.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 8.8 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Unsloth Zoo versions 2025.9.9 before 2026.8.14, as implemented in Unsloth 2025.9.9 through 2026.8.19, contains a code injection vulnerability in the model-loading compile path where the get_transformers_model_type() function in hf_utils.py collects model_type values from nested model configurations without enforcing a character allowlist, allowing newlines and arbitrary Python source to survive normalization. Attackers can embed a newline in a nested model_type value within a malicious model's config.json to terminate the generated import statement and execute arbitrary Python code via exec() in unsloth_compile_transformers(), achieving remote code execution as the loading user when the model is loaded for training or inference.

Executive ViewAI

Why It Matters

Unsloth Zoo, the model-loading component shipped inside Unsloth releases 2025.9.9 through 2026.8.19, allows a malicious model's config.json to execute arbitrary Python code inside the process of whoever loads it, handing an attacker full control of that analyst's workstation or training node. Exposure is concentrated in teams and automated pipelines that ingest third-party or user-supplied models from public hubs rather than vetted first-party checkpoints, so the business risk tracks how broadly we consume untrusted AI artifacts. No public exploit code has been identified at time of analysis, but unauthenticated attacker access combined with full code-execution impact makes this a priority for any AI/ML function running these versions.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
Very popular LLM fine-tuning library, but confined to ML/AI developer environments
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy