Описание
1Panel arbitrary file write vulnerability
Summary
There are many command injections in the project, and some of them are not well filtered, leading to arbitrary file writes, and ultimately leading to RCEs.
We can use the following mirror configuration write symbol > to achieve arbitrary file writing
PoC
Dockerfile
echo.sh
Build this image like this, upload it to dockerhub, and then 1panel pulls the image to build the container Send the following packet, taking care to change the containerID to the malicious container we constructed
Then you can write any customized file to, for example, a ssh key, and generally the application is run with root privileges
Or write a timed task to execute any command.
Impact
The ability to write arbitrary files on the host where the service is deployed can lead to a host takeover
Пакеты
github.com/1Panel-dev/1Panel
< 1.10.3-lts
1.10.3-lts
Связанные уязвимости
1Panel is an open source Linux server operation and maintenance management panel. Prior to v1.10.3-lts, there are many command injections in the project, and some of them are not well filtered, leading to arbitrary file writes, and ultimately leading to RCEs. The mirror configuration write symbol `>` can be used to achieve arbitrary file writing. This vulnerability is fixed in v1.10.3-lts.