Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Use JSON instead of pickle to avoid code injection #29

Open
emanuelb opened this issue Jun 20, 2017 · 0 comments
Open

Use JSON instead of pickle to avoid code injection #29

emanuelb opened this issue Jun 20, 2017 · 0 comments

Comments

@emanuelb
Copy link

The settings loading use pickle.load method
https://github.com/firstlookmedia/autocanary/blob/master/autocanary/settings.py#L61

which from the documentation:
https://docs.python.org/3/library/pickle.html

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

more information about how it can be exploited:
https://lincolnloop.com/blog/playing-pickle-security/

thus it will be better to use JSON instead for storing and loading the settings (to avoid the code injection security issue)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant