-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider warning about pickle code execution security aspects #13
Comments
I could add some warnings, but the use of pickling is already mentioned. What's the catch here? Should we change all the projects that use pickle to warn users that pickling has limitations? Isn't the python docs/tutorials a better place to educate users about pickling? |
"Limitations" doesn't really hit the spot for arbitrary code execution, I would say. While at it, do you have to rely on pickle for tblib or could you do the same with something more safe? |
I think there's some confusion here or you haven't actually looked at tblib's API at all :) First and foremost you have to explicitly enable pickle support to pickle tracebacks. Second, you can use tblib just fine without pickle: https://github.com/ionelmc/python-tblib#tblib-traceback-from-dict |
I actually have read down to https://github.com/ionelmc/python-tblib#raising where Raising is using pickle in its examples, exclusively. The way I read the docs until that point, pickle seemed the default way of doing things (or even needed) with tblib, not an edge cases that you would only use if and so on. I think I have made my point clear that tblib rather advertises pickle than help warn about it. If we disagree, please feel free to close this ticket. |
About the example: the problem is that tblib don't have a Not sure about what we disagree about? Perhaps the urgency to discourage everyone from using an otherwise powerful serialization library. Tblib only advertises the pickle support, it don't say "pickle is panacea to all life's problems". Frequent problems with pickle critique, and the article has all of these:
|
I'm unsure what you refer to with signatures in context of pickle. Have a link? |
Eg, this uses pickle: https://docs.djangoproject.com/en/1.10/topics/http/sessions/#using-cookie-based-sessions |
Signatures are checked before unpickling, correct? |
Yes. |
So they check signatures before unpickling and they have a big warning on pickle and code execution. That's what I would wish for from tblib. |
Happy now? |
😄 Happy would be an exaggeration. I consider that an improvement though. Thank you! |
Hi!
I noticed the pickle aspect of tblib and I am concerned that (direct or indirect) users of tblib may miss that unpickling data by other people puts them in a remote-code-execution position. Would you be in with adding a big fat warning that you should only use tblib on pickle files you produced yourself or produced by software where you have sole control over all nodes producing these files?
Thanks for your consideration, best
Sebastian
The text was updated successfully, but these errors were encountered: