Skip to content
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

Jsonpickle decode() function unsafely form objects that can lead to Remote code execution #332

Closed
j0lt-github opened this issue Dec 17, 2020 · 2 comments
Labels
not-a-bug Something that seems like a bug but is intended behavior

Comments

@j0lt-github
Copy link

JsonPickle 1.4.2 allows remote code execution during deserialization of a malicious payload through the decode() function.

Attack Vectors : The jsonpickle can be exploited by deserialization of malicious jsonpickled payload with default decode() function of its object. The payload can be easily generated by this payload generator:
https://github.com/j0lt-github/python-deserialization-attack-payload-generator
and passed to decode function
like object = jsonpickle.decode(payload)
it will certainly execute command.

@d-hat
Copy link

d-hat commented Dec 18, 2020

According to this project's README:

WARNING: jsonpickle can execute arbitrary Python code. Do not load jsonpickles from untrusted / unauthenticated sources.

This property of pickle is well known and documented:

Warning: The pickle module is not secure. Only unpickle data you trust.

It is possible to construct malicious pickle data which will execute arbitrary code during unpickling

@jaraco
Copy link
Contributor

jaraco commented Dec 18, 2020

This report was also sent to the project in Tidelift. I've responded there as well indicating that this is a known issue and that there's no known fix for this vulnerability. Recommend to close as wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-a-bug Something that seems like a bug but is intended behavior
Projects
None yet
Development

No branches or pull requests

4 participants