← Voltar ao blog
Ameaças IAAltaDestaque

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.

Revisão editorial:

O texto deste artigo está disponível em inglês nesta versão do site.

Contexto e fontes

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]

Âmbito e limites

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

Explicação simples

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

Recomendações práticas

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.

Fonte primária / referência

  1. [1] Python documentation: pickle security warning