- In file
main.py, binary clear s executed with os.system() without the path specified e.g /usr/bin/clear or /bin/clear. An attacker can control the PATH environment variable leading to code execution.
#line 687
elif command[0] == 'clear':
if sys.platform == "win32":
os.system("cls")
else:
os.system("clear")
- Walkthrough-:
- Prepping the path up-:
os.system('/usr/bin/clear')
main.py, binaryclears executed withos.system()without the path specified e.g/usr/bin/clearor/bin/clear. An attacker can control thePATHenvironment variable leading to code execution.