CVE-2026-93348: Improper Control of Generation of Code ('Code Injection') in unslothai unsloth-zoo
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.
AI Analysis
Technical Summary
CVE-2026-93348 is a code injection vulnerability in Unsloth Zoo's model-loading compile path affecting versions >=2025.9.9 and <2026.8.14. The vulnerability exists in the get_transformers_model_type() function in hf_utils.py, which collects model_type values from nested model configurations without enforcing a character allowlist. This allows attackers to embed newlines and arbitrary Python code in a nested model_type value within a malicious model's config.json. The injected code terminates the generated import statement and is executed via exec() in unsloth_compile_transformers(), resulting in remote code execution as the loading user during model loading for training or inference.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary Python code remotely with the privileges of the user loading the model. This can lead to full compromise of the affected system or environment where the model is loaded.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
CVE-2026-93348: Improper Control of Generation of Code ('Code Injection') in unslothai unsloth-zoo
Description
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.
CVSS v4.0
Score 8.6high
Affected software
unslothai
unsloth-zoo
unslothai
unsloth
pkg:github/unsloth-zooRun 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
Technical Analysis
CVE-2026-93348 is a code injection vulnerability in Unsloth Zoo's model-loading compile path affecting versions >=2025.9.9 and <2026.8.14. The vulnerability exists in the get_transformers_model_type() function in hf_utils.py, which collects model_type values from nested model configurations without enforcing a character allowlist. This allows attackers to embed newlines and arbitrary Python code in a nested model_type value within a malicious model's config.json. The injected code terminates the generated import statement and is executed via exec() in unsloth_compile_transformers(), resulting in remote code execution as the loading user during model loading for training or inference.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary Python code remotely with the privileges of the user loading the model. This can lead to full compromise of the affected system or environment where the model is loaded.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-09-17T18:41:40.757Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aba88c5f7a7c54106dc6f32
Added to database: 09/28/2026, 15:33:25 UTC
Last enriched: 09/28/2026, 15:47:43 UTC
Last updated: 09/29/2026, 02:54:12 UTC
Views: 16
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.