Unsloth Studio Flaw Allowed Malicious Models to Execute Code During Inspection

· Original article ↗

Summary

A flaw in Unsloth Studio let malicious Hugging Face models execute Python code when users inspected their configuration. Unsloth fixed the issue in version 2026.6.9; researchers report no evidence of real-world exploitation.

Key points

  • Selecting a malicious model in Unsloth Studio could execute Python code from its Hugging Face repository, even before the model weights were loaded or inference began.
  • The flaw stemmed from using Transformers’ `trust_remote_code=True` while checking a model’s `config.json`.
  • Code ran with the user's permissions and could potentially access data, model artifacts, or credentials available to the compromised process.
  • Unsloth fixed the issue in update 2026.6.9; Pillar Security tested the attack vector and confirmed it was closed.
  • Pillar reported no evidence of real-world exploitation of this particular mechanism and said no CVE was assigned.
  • Pillar recommended upgrading to Unsloth Studio 2026.6.9 or later and treating repositories loaded with `trust_remote_code` as executable, untrusted code.

Article Details

Vulnerability Types
  • Arbitrary code execution through Python code in a malicious model repository
Exploitation Status
not_reported
Exploit Availability
none_reported
Patch Status
available
Workarounds
  • Treat model repositories loaded with Transformers trust_remote_code as untrusted code rather than data.
  • Ensure tools in the pipeline do not enable trust_remote_code on the user's behalf.

MITRE ATT&CK

CVE

People

Vendors

Products

Related Articles