Browse / Unsafe Model Loading and Supply Chain
Unsafe Model Loading and Supply Chain
Malicious model files, pickle deserialisation, poisoned packages and artifacts. 280 records. Reference: OWASP LLM03 · ATLAS AML.T0010.
- Code and command execution 98
- Unsafe deserialisation 77
- Denial of service 39
- Path traversal and file access 20
- Memory corruption 18
- Real-world incidents 6
- Data exfiltration 5
- Publish Poisoned AI Artifacts: Models 5
- Other weaknesses 3
- Supply Chain Compromise: Software 3
- Information exposure 2
- Supply Chain Compromise: Data Repository 2
- Cross-site scripting 1
- Publish Poisoned AI Artifacts: AI Agent Tools 1
- Picklescan Bypasses Unsafe Globals Check using pty.spawn A pickle payload calling pty.spawn evades the scanner because that function is missing from its unsafe globals list, enabling code execution when loaded.
- Picklescan vulnerable to Arbitrary File Writing A crafted pickle calls a distutils file-writing helper that the scanner's blocklist does not cover, overwriting arbitrary files on disk.
- Picklescan missing detection when calling numpy.f2py.crackfortran.getlincoef Picklescan's blocklist omits numpy.f2py.crackfortran functions that eval strings, so a pickle calling getlincoef runs code while passing the scan.
- Picklescan missing detection when calling pty.spawn A pickle's __reduce__ calls pty.spawn to run shell commands, and picklescan does not flag pty.spawn, so the scan reports the file as clean.
- Picklescan is vulnerable to RCE through missing detection when calling built-in python operator.methodcaller A pickle using operator.methodcaller to call a system function evades picklescan, so loading the file runs attacker commands.
- Hugging Face smolagents: Unsafe deserialization in Remote Python Executor leads to RCE The remote executor unpickles unvalidated network data, so an unauthenticated sender can run code as the service account.
- vLLM vulnerable to remote code execution via transformers_utils/get_config Loading a model config whose auto_map points to another repository imports and runs that repository's Python even when remote code is disabled.
- MLX has Wild Pointer Dereference in load_gguf() A malicious GGUF file supplies a wild tensor data pointer that load_gguf dereferences without validation, crashing the process.
- vLLM deserialization vulnerability leading to DoS and potential RCE The Completions endpoint loads user-supplied tensor embeddings with torch.load, where disabled sparse checks let crafted tensors cause out-of-bounds writes.
- LangGraph Checkpoint affected by RCE in "json" mode of JsonPlusSerializer A fallback JSON serialisation mode lets crafted checkpoint payloads rebuild arbitrary objects during loading, running attacker-chosen Python code.
- Keras is vulnerable to arbitrary local file loading and Server-Side Request Forgery A crafted .keras archive sets a StringLookup vocabulary path to a local file or remote URL, and load_model reads it even with safe_mode enabled.
- Keras framework vulnerable to deserialization of untrusted data A crafted Keras file referencing a TorchModuleWrapper class runs attacker code while loading, even with safe mode enabled, whether the file is local or remote.
- ZenML is vulnerable to Path Traversal through its `PathMaterializer` class The archive extraction check validates path names but ignores symlinks and hardlinks, so a crafted artifact writes files outside the target directory.
- llama-index-core insecurely handles temporary files A predictable shared temp cache directory lets other local users read or replace cached models and embeddings, or plant symlinks.
- Keras is vulnerable to Deserialization of Untrusted Data A crafted .keras archive re-enables unsafe deserialisation from inside its config before layer parsing, then a pickled Lambda layer runs attacker code when the model loads.
- The Keras `Model.load_model` method **silently** ignores `safe_mode=True` and allows arbitrary code execution when a `.h5`/`.hdf5` file is loaded. Loading an .h5 model ignores safe_mode=True, so pickled code inside the file runs on the victim's machine during load.
- Picklescan is Vulnerable to Unsafe Globals Check Bypass through Subclass Imports Pickles referencing subclasses of dangerous asyncio classes evade picklescan's exact module-name check, so their embedded payloads load and execute.
- Picklescan Bypass is Possible via File Extension Mismatch Picklescan sends a plain pickle with a PyTorch file extension down the PyTorch path, which errors out without running the pickle scanner, so malicious payloads go unflagged.
- Picklescan: ZIP archive scan bypass is possible through non-exhaustive Cyclic Redundancy Check Picklescan returns no results for a ZIP archive containing a bad CRC, while PyTorch can still load the hidden malicious pickle inside it.
- SGLang Remote Code Execution Vulnerability via Unsafe Deserialization in update_weights_from_tensor The weight-update endpoint deserialises attacker-supplied tensor payloads unsafely, letting a remote caller run code on the server.
- Model Namespace Reuse Supply Chain Attack
- Picklescan is missing detection when calling built-in python idlelib.pyshell.ModifiedInterpreter.runcode A pickle payload calling idlelib's ModifiedInterpreter.runcode is not flagged by picklescan, so loading the malicious model file executes attacker code.
- Picklescan has a missing detection when calling built-in python idlelib.debugobj.ObjectTreeItem The pickle scanner does not flag calls to idlelib debugobj methods, so a malicious pickle that uses them passes the scan and runs commands when loaded.
- Picklescan is missing detection when calling built-in python cProfile.run A pickle payload calling cProfile.run executes arbitrary code on load, and the picklescan detector does not flag it.
- Picklescan is missing detection when calling pytorch function torch.utils.bottleneck.__main__.run_autograd_prof A crafted pickle calls a torch profiling helper that runs arbitrary code, and the scanner does not flag that function, so loading the file executes it.
- Picklescan has a missing detection when calling built-in python trace.Trace.run A pickle that calls trace.Trace.run to run a shell command is not flagged by the scanner, so loading it executes the code.
- Picklescan has a missing detection when calling built-in python profile.Profile.runctx A pickle whose reduce calls profile.Profile.runctx runs arbitrary code when loaded, and the scanner does not flag that built-in function.
- Picklescan has a missing detection when calling built-in python idlelib.autocomplete.AutoComplete.get_entity A pickle that calls idlelib AutoComplete.get_entity executes attacker code on load, and the scanner misses this built-in callable.
- Picklescan has a missing detection when calling built-in python idlelib.autocomplete.AutoComplete.fetch_completions A pickle payload calling idlelib's AutoComplete.fetch_completions is not flagged by picklescan, so loading it runs attacker-chosen code.
- Picklescan has a missing detection when calling built-in python idlelib.calltip.Calltip A pickle payload calls idlelib's Calltip.fetch_tip, which evaluates arbitrary expressions, and picklescan does not flag it, so unpickling runs attacker code.
- Picklescan is missing detection when calling built-in Python cProfile.runctx Picklescan does not flag cProfile.runctx, so a pickle that calls it to run arbitrary code passes the scan and executes on load.
- Picklescan has a missing detection when calling built-in python library idlelib.calltip.get_entity A pickle payload calls a standard library helper that evaluates strings as Python, and the scanner does not flag that call, so loading the file runs code.
- Picklescan has a missing detection when calling built-in python code.InteractiveInterpreter A malicious pickle calls the interactive interpreter's runcode method, which the scanner does not flag, so loading the file still runs attacker code.
- Picklescan has a missing detection when calling built-in python lib2to3.pgen2.grammar.Grammar.loads A pickle that calls lib2to3's Grammar.loads to run embedded code is not flagged by picklescan, so loading it executes the attacker's payload.
- Picklescan is missing detection when calling built-in python doctest.debug_script A pickle payload invokes doctest's debug_script to run embedded code, and the scanner does not flag that call.
- Picklescan has a missing detection when calling built-in python trace.Trace.runctx A pickle payload calling trace.Trace.runctx during reconstruction runs commands on load, and the scanner fails to flag it as dangerous.
- Picklescan is missing detection when calling built-in python idlelib.pyshell.ModifiedInterpreter.runcommand A pickle payload calls an idlelib function the scanner does not flag, so a malicious model passes scanning and runs code when loaded.
- Picklescan is missing detection when calling built-in python idlelib.run.Executive.runcode A pickle payload that calls idlelib's runcode evades picklescan's detection, so a scanned malicious file still executes code on load.
- Picklescan is missing detection when calling built-in python lib2to3.pgen2.pgen.ParserGenerator.make_label A pickle payload calls a lib2to3 function that the scanner does not flag, so loading the file still runs attacker-chosen code.
- Picklescan is missing detection when calling built-in python library asyncio.unix_events._UnixSubprocessTransport._start A pickle payload calling an asyncio subprocess internal is absent from the scanner's denylist, so the scan passes and loading the file runs a command.
- Picklescan has a missing detection when calling built-in python profile.Profile.run A pickle payload calling profile.Profile.run with a code string evades picklescan's detection and executes on load.
- Picklescan is missing detection when calling built-in python ensurepip._run_pip A pickle payload calling the ensurepip internal run-pip helper is not on picklescan's dangerous list, so loading the model runs shell commands.
- Picklescan missing detection when calling pytorch function torch.utils.bottleneck.__main__.run_cprofile A pickle payload calls a torch profiling helper that runs arbitrary code, and the scanner fails to flag that call, so loading the file executes it.
- Picklescan missing detection when calling pytorch function torch._dynamo.guards.GuardBuilder.get A PyTorch dynamo helper is missing from the scanner's list, so a pickle that calls it to run shell commands is reported as safe.
- Picklescan missing detection when calling pytorch function torch.fx.experimental.symbolic_shapes.ShapeEnv.evaluate_guards_expression A pickle payload calling a PyTorch symbolic shapes function evades picklescan's detection yet executes arbitrary code when loaded.
- Picklescan missing detection when calling pytorch function torch.utils.collect_env.run A pickle that calls PyTorch's collect_env run helper to execute a shell command is not detected by picklescan, so loading it runs the command.
- Picklescan missing detection when calling pytorch function torch.utils.data.datapipes.utils.decoder.basichandlers A pickle payload that routes through a PyTorch datapipes helper to call os.system evades picklescan's detection and runs code when loaded.
- Picklescan missing detection when calling pytorch function torch.jit.unsupported_tensor_ops.execWrapper A pickle's __reduce__ invokes torch.jit's execWrapper with a code string, which picklescan does not flag, so loading the file runs attacker commands.
- Picklescan is missing detection when calling pytorch function torch.utils._config_module.load_config A pickle calls a torch.utils config loader with an embedded payload that picklescan does not inspect, so unpickling runs the attacker's os.system command.
- Keras vulnerable to CVE-2025-1550 bypass via reuse of internal functionality Crafted arguments to built-in Keras modules let a malicious saved model trigger file overwrites during loading even with safe mode enabled.