[New-bugs-announce] [issue37977] Big red pickle security warning should stress the point even more

Daniel Pope report at bugs.python.org
Thu Aug 29 09:28:33 EDT 2019


New submission from Daniel Pope <lord.mauve at gmail.com>:

CVEs related to unpickling untrusted data continue to come up a few times a year:

https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=pickle

This is certainly the tip of the iceberg. In a previous role I noted several internal services that could be compromised with maliciously crafted pickles. In my current role I can already see two internal services that look vulnerable. And in both organisations, little attention was paid to pickle data exchanged with other users over network filesystems, which may allow privilege escalation.

Chatting to Alex Willmer after his Europython talk in 2018 (https://github.com/moreati/pickle-fuzz/blob/master/Rehabilitating%20Pickle.pdf) we discussed that the red warning in the docs is still not prominent enough, even after moving it to the top of the page in https://bugs.python.org/issue9105.

The warning currently says:

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

I would suggest several improvements:

* Simpler, more direct English.
* Explain the severity of vulnerability that doing this will cause.
* Link to the hmac module which can be used to prevent tampering.
* Link to the json module which is safer if less powerful.
* Simply making the red box bigger (adding more text) will increase the prominence of the warning.

----------
assignee: docs at python
components: Documentation
messages: 350777
nosy: docs at python, lordmauve
priority: normal
severity: normal
status: open
title: Big red pickle security warning should stress the point even more
type: security
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37977>
_______________________________________


More information about the New-bugs-announce mailing list