Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fix(seed): disable remote code execution in seed inspect dataset loads (#4275)

Daniel Han1f99dee027d6
diff --git a/studio/backend/routes/data_recipe/seed.py b/studio/backend/routes/data_recipe/seed.py
index 76e05be954b..1765550adc6 100644
--- a/studio/backend/routes/data_recipe/seed.py
+++ b/studio/backend/routes/data_recipe/seed.py
@@ -118,6 +118,7 @@ def _build_stream_load_kwargs(
"path": dataset_name,
"split": split,
"streaming": True,
+ "trust_remote_code": False,
}
if data_file:
kwargs["data_files"] = [data_file]
diff --git a/studio/backend/tests/test_data_recipe_seed.py b/studio/backend/tests/test_data_recipe_seed.py
new file mode 100644
index 00000000000..601df8bbfe7
--- /dev/null
+++ b/studio/backend/tests/test_data_recipe_seed.py
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: AGPL-3.0-only
+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+from pathlib import Path
+
+
+def test_seed_inspect_load_kwargs_disables_remote_code_execution():
+ seed_route = (
+ Path(__file__).resolve().parent.parent / "routes" / "data_recipe" / "seed.py"
+ ).read_text()
+
+ assert '"trust_remote_code": False' in seed_route