-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Arbitary code execution loguru #1592
Arbitary code execution loguru #1592
Conversation
…ecution-loguru the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Hey @Anon-Artist, sorry to bump this ticket almost one year later. I'm the maintainer of Loguru, do you have a few minutes to clarify the issue please? The PoC you shared demonstrates a way to execute arbitrary code using one Loguru's method. This is true, however I don't understand why this would make Loguru insecure by itself. Here are my concerns:
import logging.handlers
logging.handlers.pickle.loads(malicious)
import os
class MyClass:
def __str__(self):
os.system("xcalc")
logger.info(MyClass())
Perhaps I am missing a key element of understanding, but I feel Loguru is unfairly flagged for using |
Description
Loguru is a library which aims to bring enjoyable logging in Python.
untrusted loading of data by the pickle.load function leading to Arbitrary code execution.
Proof of Concept
Run exploit.py
pip3 install loguru
python3 exploit.py