Case · DiggingBeagle record

Unsloth model_type metadata reached Python execution despite remote-code trust disabled

The Unsloth model-loading pipeline interpolated the model_type value from an untrusted model configuration into generated Python execution code. Embedded source content in that metadata field could execute before model weights or tokenizer code were processed even with trust_remote_code set to false.

Scope

A developer had to load a model artifact with attacker-controlled configuration through the affected Unsloth or unsloth-zoo loader. The reported arbitrary-code execution was a controlled reproduction, not a census of exploited AI deployments.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Evidence
Grade B
Remediation
patch available
AI role
AGAINST AI
Basis and provenance

The cited primary technical report or advisory supports the stated mechanism within its reported scope. The assessment does not infer a production breach, a victim count or a comparable impact score from a laboratory result. A maintainer or advisory names a patched release; that does not prove every deployed instance has updated. Boundary: Setting trust_remote_code to false can block one code-loading pathway without preventing string interpolation into an unrelated internal exec.

Assessed Oct 29, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Step

  2. 02

    Step

  3. 03

    Step

Claims & evidence

CLM-ENRICH-20261029-34Pillar Security demonstrates that model_type text from an untrusted model config could reach executable Python source generation in affected Unsloth loaders even when trust_remote_code was disabled.supported

Basis: reported finding

Link to claim
CLM-CP23-UNSLOTH-MODEL-LOADER-EXEC-1The Unsloth model-loading pipeline interpolated the model_type value from an untrusted model configuration into generated Python execution code. A developer had to load a model artifact with attacker-controlled configuration through the affected Unsloth or unsloth-zoo loader. Embedded source content in that metadata field could execute before model weights or tokenizer code were processed even with trust_remote_code set to false.supported

Basis: reported finding

Link to claim

Implications

Embedded source content in that metadata field could execute before model weights or tokenizer code were processed even with trust_remote_code set to false.

Controls and mitigations

  • Upgrade affected Unsloth packages to fixed versions and treat model metadata as typed data rather than executable source code.

Unknowns and contradictions

  • The reported arbitrary-code execution was a controlled reproduction, not a census of exploited AI deployments.

Sources and citation

Material revision history

  1. Oct 29, 2026 · Canonical change recorded · new in release · revision 202