// AI threat desk · 26 Nov 2026
Home/SUPPLY · AI Supply Chain
AI Supply ChainHighRCECVSS not assigned

Unsloth Studio flaw could run code from a malicious model

Unsloth Studio could execute Python code from a selected model repository, exposing data and credentials accessible to the backend. Pillar Security disclosed the flaw on Sep 29, 2026.

stock image, not from the event
File photo: stock image, not from the event. Photo: fotoblend / Pixabay
Key takeaways
  • Pillar Security found an arbitrary-code-execution vulnerability in Unsloth Studio.
  • Selecting a model could cause the backend to download and run Python code from its Hugging Face repository.
  • Pillar Security said version 2026.6.9 closed the attack vector.

Pillar Security disclosed an arbitrary-code-execution vulnerability in Unsloth Studio on Sep 29, 2026. The company said Unsloth maintainers had shipped a fix on Jun 18, 2026, and it later confirmed the attack vector was closed in version 2026.6.9.

The attack required a user to run Studio and select an attacker-controlled model. The code ran with that user’s permissions in the Studio backend and could expose proprietary training data, model artifacts, Hugging Face tokens, SSH keys and cloud credentials accessible to the process.

Unsloth Studio is the web UI and backend shipped inside the unsloth fine-tuning package. The affected code shipped in the standard package, so users could receive it through an ordinary pip install unsloth installation.

On this page

Model inspection triggered Python execution before inference

Reading a model’s config.json was enough to trigger the exploit. The backend did not need to load the model weights or run inference, because inspecting the model was enough to run its code.

The vulnerable sink defaulted load_model_config trust_remote_code to true. Pillar Security said the capability probe was reachable through GET /api/models/config/{model_name:path} and GET /api/models/check-vision/{model_name:path}.

In Pillar Security’s proof of concept, selecting ariel-pillar/unsloth_poc in the model picker caused the backend to download and run the repository’s module. The payload opened the operating system calculator and appended a line to ~/UNSLOTH_POC_RCE.txt.

Pillar Security reported the issue privately in June

Pillar Security reported the issue privately to the Unsloth maintainers in early June 2026 through GitHub Security Advisory GHSA-pc2m-72c4-r38q, with an end-to-end proof of concept and a proposed fix.

Pillar Security said the issue was still present in the then-current build when it retested on Jun 18, 2026, and that it reshared the proof of concept. It also said the maintainers shipped a fix on Jun 18, 2026.

Pillar Security independently retested version 2026.6.9 and confirmed that the attack vector was closed. It said arbitrary models could no longer be inspected and loaded from Hugging Face through this path.

Version 2026.6.9 changed how Studio loads models

InfoWorld reported that version 2026.6.9 changed Studio so it no longer enabled arbitrary model loading directly from Hugging Face and no longer trusted remote code from local model files.

A Hugging Face report published on Aug 14, 2026 said Unsloth was the third-largest source of model derivatives on the Hugging Face Hub.

Pillar Security published its write-up independently after the fix was available. It said the maintainers declined to publish an advisory because the software was beta.

What to do now

  1. Upgrade Unsloth Studio to 2026.6.9 or later.
  2. Treat model repositories loaded using the transformers library trust_remote_code as untrusted code rather than data.
  3. Audit LLM workflows for unnecessary occurrences of trust_remote_code=True.

FAQ

What happened to Unsloth Studio?

Pillar Security found an arbitrary-code-execution vulnerability that could run Python code when a user selected an attacker-controlled model.

How did the Unsloth Studio vulnerability work?

Reading a model’s config.json could trigger the exploit before Studio loaded the weights or ran inference. The code ran with the user’s permissions in the backend process.

What could an attacker reach through the flaw?

The vulnerability could expose proprietary training data, model artifacts, Hugging Face tokens, SSH keys and cloud credentials accessible to the Studio process.

How do you fix the Unsloth Studio vulnerability?

Upgrade Unsloth Studio to version 2026.6.9 or later. Pillar Security independently retested version 2026.6.9 and confirmed that the attack vector was closed.

What is trust_remote_code in this attack?

The vulnerable code defaulted load_model_config trust_remote_code to true, allowing the model-inspection path to run code from a repository. Pillar Security recommended treating repositories loaded with trust_remote_code as untrusted code rather than data.

Sources

  1. Look, Don't Load: Model Inspection in Unsloth Studio Leads to Critical Arbitrary Code Execution, Pillar SecurityPrimary
  2. State of Open Models: Summer 2026 Observations, Hugging FacePrimary
  3. Unsloth Studio Flaw Turns Routine Model Inspection Into Code Execution, Dark Reading
  4. Unsloth’s model picker had a code-execution problem, InfoWorld
How we checked this story
ClaimSourceStatus
Pillar Security found an arbitrary-code-execution vulnerability in Unsloth Studio.Pillar SecurityConfirmed
Selecting a model caused the backend to download and run Python code from its Hugging Face repository.Pillar SecurityConfirmed
Reading a model’s config.json was enough to trigger the exploit before weights were loaded or inference ran.Pillar SecurityConfirmed
The code ran with the user’s permissions in the Studio backend process.Pillar SecurityConfirmed
The vulnerability could expose training data, model artifacts, Hugging Face tokens, SSH keys, and cloud credentials accessible to the process.Pillar SecurityConfirmed
Exploitation required running Studio and selecting an attacker-controlled model.Pillar SecurityConfirmed
The affected code shipped in the standard unsloth package and could arrive through an ordinary pip install unsloth installation.Pillar SecurityConfirmed
Pillar Security said unsloth Studio was beta, and its maintainers declined to publish an advisory after shipping a fix.Pillar SecurityAttributed
Pillar Security said unsloth maintainers shipped a fix on June 18, 2026.Pillar SecurityAttributed
Pillar Security independently retested version 2026.6.9 and confirmed that the attack vector was closed.Pillar SecurityConfirmed
The vulnerable sink defaulted load_model_config trust_remote_code to true.Pillar SecurityConfirmed
The capability probe was reachable through two HTTP endpoints.Pillar SecurityConfirmed
Pillar Security’s proof of concept selected ariel-pillar/unsloth_poc and caused the backend to run its module.Pillar SecurityConfirmed
The proof-of-concept payload opened the OS calculator and appended a line to ~/UNSLOTH_POC_RCE.txt.Pillar SecurityConfirmed
Pillar Security reported privately to Unsloth in early June 2026 through GHSA-pc2m-72c4-r38q.Pillar SecurityConfirmed
Pillar Security said the issue remained present when it retested on June 18, 2026, and it reshared the proof of concept.Pillar SecurityConfirmed
Pillar Security published its write-up independently on September 29, 2026, after the fix was available.Pillar SecurityConfirmed
Dark Reading reported that the patched vulnerability allowed malicious AI models to execute arbitrary Python code during inspection through trust_remote_code.Dark ReadingAttributed
Ariel Fogel said the code ran from nothing more than a metadata check.Ariel Fogel, via InfoWorldAttributed
Hugging Face reported that Unsloth was the third-largest source of model derivatives on its Hub.Hugging FaceConfirmed
huggingface.co published its report on Aug 14, 2026.huggingface.coConfirmed

Could not verify

  • Whether the vulnerability was exploited in the wild is not established
  • How many users or installations were affected is not established
  • Whether any attacker obtained credentials or data is not established
Explore with AI