PyCon UK

Registration Office

Rehabilitating Pickle

Alex Willmer

Sunday 16th, 15:30 (Assembly Room)

A talk (25 minutes)

Pickle is a compact serialisation protocol for Python objects. It could be a convenient way for Python programs and distributed systems to communicate. Unfortunately pickle is widely considered to be unsafe, and it has lead to several vulnerabilities over the years. As the Python manual warns

> The pickle module is not secure against erroneous or
> maliciously constructed data. Never unpickle data
> received from an untrusted or unauthenticated source.

Does this have to be the case? Can we use Pickle safely?

This talk will be a deep dive into what an attacker can do with a maliciously constructed pickles. I’ll show what defences you can implement against the common attacks, especially those that gain arbitrary code execution. I will present new research into other attacks, and mitigations. Finally I will review a few less known alternatives to pickle.

Back to schedule