K
K
kAIST2012-03-28 07:38:59
Python
kAIST, 2012-03-28 07:38:59

Is python pickle safe?

There is some application that provides for the exchange of data between users, as well as uploading data to the site. The application is written in python, the data is serialized using cPickle.
Is this approach safe, and can an attacker put code there that will be executed? I feel with my heels that yes, but I can’t prove it)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nuit, 2012-03-28
@nuit

docs.python.org/library/pickle.html
"Warning: The pickle module is not intended to be secure against erroneous or maliciously constructed data. Never unpickle data received from an untrusted or unauthenticated source."

N
northicewind, 2012-03-28
@northicewind

You can try Google protocol buffers , although the implementation in python is younger than in C ++, but it works very well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question