Open ceballosm opened 5 years ago
running that application through CodeQL with a simple query like so:
import python
...
exists(GlobalVariable os | os = ((Name)c.getFunc()).getVariable() and os.getId() = "shell")
...
other similar issues popped up.
shell()
common_controller.py:148 Potential OS Command Injection.
shell()
health_controller.py:27 Potential OS Command Injection.
shell()
health_controller.py:47 Potential OS Command Injection.
shell()
kickstart_controller.py:27 Potential OS Command Injection.
shell()
kickstart_controller.py:110 Potential OS Command Injection.
rock-frontend kickstart_controller.py does not sanitize user input in get_unused_ip_addrs() allowing for remote unauthenticated code execution.
The vulnerability can be viewed here:
Where on line 106, the json object 'mng_ip' can be abused by appending the user controlled value of an ip followed with shell meta-characters allowing for arbitrary os commands. Once interpreted, the os commands will run as root.