Malicious Model / Unsafe Serialization
Testing whether unsafe model-file formats and loading practices can lead to code execution, and how Safetensors and related safeguards change that.
- Category
- AI Supply Chain
- Difficulty
- Advanced
- Last Updated
- 20 September 2026
Lab detail
Objective
Some legacy model-serialization formats (notably pickle-based .bin/.pt files) can execute arbitrary code on load, which is why safer formats like Safetensors exist. This lab will test, in an isolated environment, how a malicious payload embedded in an unsafe serialization format behaves when loaded through common tooling, and how effectively safer formats and scanning tools prevent it.
Planned Scope
- Build isolated, disposable environments for safely observing unsafe deserialization behavior.
- Compare loading behavior across unsafe legacy formats and Safetensors.
- Evaluate model-scanning tools for detection of known-unsafe patterns.
- Document safe model-loading practices for a private/local LLM pipeline.
This lab specifically requires strict environment isolation — see Responsible Use below before any implementation work begins.
Framework Mapping
Referenced frameworks
Exact control-ID mappings are to be validated as this lab progresses — see the full Frameworks reference.
Responsible Use / Safety Notes
How this lab is run
This lab uses synthetic data and controlled environments. It is intended to demonstrate defensive AI-security principles and does not contain customer data, production credentials or intentionally weaponized exploit infrastructure.
A decision is waiting for sign-off. Get an independent view first.
Tell me what is being decided and what is at stake. I will first say honestly whether my experience fits — then we talk about scope, not before.
Or connect on LinkedIn first.