Code Injection in c0oki3s/python-tools
Valid
Reported on
May 3rd 2021
✍️ Description
python-tools
is using an unsecure input
function in https://github.com/C0oki3s/python-tools/blob/main/Dir_create/Dir_create.py#L8.
Given that the script can be run using python2
or python3
, if you feed the program with a python command and the python interpreter is python2, then the interpreter will eval()
your input
🕵️♂️ Proof of Concept
Run https://github.com/C0oki3s/python-tools/blob/main/Dir_create/Dir_create.py Then when asked to enter an input, enter the following
__import__("os").system("ls")
💥 Impact
Code execution.
Please raw_input
instead.
Occurrences
to join this conversation