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



