AI engineering glossary · Evals guardrails AI security

What is pickle deserialization risk?

Pickle deserialization risk: The danger that loading a Python pickle file, a common format for saved model weights, can execute arbitrary code embedded in the file. Opening an untrusted model in this format is like running an unknown program, so safer formats or scanning are recommended.

Level: intermediateTopic: Evals guardrails AI security

Pickle deserialization risk: an example

Loading a downloaded .pkl model file quietly runs a command that installs malware on the developer's laptop.

Related terms

More Evals guardrails AI security terms

Where you learn it

Pickle deserialization risk is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.