Fixed pickle arbitary code execution bug in _recattrs#1
Fixed pickle arbitary code execution bug in _recattrs#1Asjidkalam wants to merge 1 commit into418sec:masterfrom
Conversation
|
👋 Hello, @Delgan - @Asjidkalam has opened a PR to us with a fix for a potential vulnerability in your repository. To view the vulnerability, please refer to the bounty URL in the first comment, above. Ultimately, you get to decide if the fix is 👍 or 👎. If you are happy with the fix, please write a new comment ( If you have any questions or need support, come and join us on our community Discord! @Delgan & @Asjidkalam - thank you for your efforts in securing the world’s open source code! 🎉 |
|
Hi. Thanks for the security report. However, I'm not sure protecting The From what I see, the PoC is not different than calling import os
class MyClass:
def __str__(self):
os.system("xcalc")
logger.info(MyClass()) |
📊 Metadata *
Pickle code execution
Bounty URL: https://www.huntr.dev/bounties/1-pip-loguru
⚙️ Description *
Loguru is a library which aims to bring enjoyable logging in Python.
💻 Technical Description *
Untrusted loading of data by the pickle.load function leading to Arbitrary code execution.
🐛 Proof of Concept (PoC) *
pip3 install logurupython3 exploit.py🔥 Proof of Fix (PoF) *
Made the pickle loads safe by restricting the pickler. Hence no code will be executed.
no calc pops
👍 User Acceptance Testing (UAT)
All OK, no breaking changes introduced. :)