Skip to content
NewA calmer, faster ZeroHour

CVE-2026-93348

Code injection RCE in Unsloth model loading

CVSS 4.0
8.6 high
EPSS
—
Published
·
Modified
Analyze CVE-2026-93348 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

Unsloth Zoo, as used by Unsloth, has a code-injection flaw in the model-loading compile path. get_transformers_model_type() in hf_utils.py copies model_type strings from nested model configurations without a character allowlist, so a newline and extra Python in a malicious config.json can survive normalization, close the generated import, and run through exec() in unsloth_compile_transformers(). An attacker who supplies that model gains remote code execution as the user who loads it for training or inference; the victim must load the model (CVSS 4.0 8.6, user interaction passive). Affected builds are Unsloth Zoo 2025.9.9 before 2026.8.14 and Unsloth 2025.9.9 through 2026.8.19. It is not on the CISA KEV list and no public proof-of-concept is known.

What to do: Upgrade Unsloth Zoo to 2026.8.14 or later and Unsloth to a release newer than 2026.8.19. Until then, load models only from trusted sources and treat config.json model_type values, including nested ones, as untrusted input. Review hosts that trained or inferred with affected builds for unexpected code execution under the loading user.

ProductAffected
Unsloth AI Unsloth Zoo2025.9.9 before 2026.8.14
Unsloth AI Unsloth2025.9.9 through 2026.8.19
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

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.

Weakness
CWE-94
Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

1 story