← Retour au blog
Menaces IAÉlevéeÀ la une

Loading AI models: Why unknown pickle files can execute code

Python explicitly warns against untrusted pickle data. Review the file format and any accompanying model software separately.

Révision éditoriale :

Le texte de cet article est disponible en anglais dans cette version du site.

Contexte et sources

Pickle serialises and reconstructs Python objects. Python’s documentation warns that maliciously constructed pickle data can execute arbitrary code when unpickled. A model download containing such objects is therefore not necessarily passive numerical data. Consequences depend on the processing account’s permissions and reachable resources. [1]

Portée et limites

Not every pickle file is malicious. The format warning establishes neither a count of infected models nor automatic administrator access. [1]

En termes simples

A downloaded box may contain both numbers and instructions executed while opening it. Provenance and the environment used to open it matter.

Recommandations pratiques

Our recommendation: evaluate unfamiliar models in a separate environment without production credentials. Review provenance, versions, startup scripts and dependencies. Where practical, prefer formats for numerical weights that do not require arbitrary Python objects. Still inspect any separately loaded code: a different weight format does not make the complete package trustworthy.

Source primaire / référence

  1. [1] Python documentation: pickle security warning