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

FYI: marshal #2

Open
KOLANICH opened this issue May 20, 2019 · 2 comments
Open

FYI: marshal #2

KOLANICH opened this issue May 20, 2019 · 2 comments

Comments

@KOLANICH
Copy link

https://docs.python.org/3/library/marshal.html is a yet another insecure serialization impl.

@moreati
Copy link
Owner

moreati commented May 29, 2019

Thanks, I was vaguely aware of it. To my knowledge it's only used for .pyc files, and then arbitrary code execution is kind of the point. Have you seen it used for other purposes, or other contexts?

@KOLANICH
Copy link
Author

No, I haven't. But arbitrary code execution may be really an issue. For example I have created a lib dumping and patching interpreter's frozen table because for debugging of my lib I had to patch some importlib's internals, so the lib is not targeted to use for manipulating any untrusted code. But it is possible to imagine a possibility of malware/backdoor/rootkit embedded into the interpreter and hiding itself and built the way that unmarshalling it will result in its execution.

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

No branches or pull requests

2 participants