Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-8j63-96wh-wh3j
No affected components available
Project Address: Project Address 1Panel
Official website: https://www.1panel.cn/
Time: 2025 07 26
Version: 1panel V2.0.5
Vulnerability Summary
- First, we introduce the concepts of 1panel v2 Core and Agent. After the new version is released, 1panel adds the node management function, which allows you to control other hosts by adding nodes.
- The HTTPS protocol used for communication between the Core and Agent sides did not fully verify the authenticity of the certificate during certificate verification, resulting in unauthorized interfaces. The presence of a large number of command execution or high-privilege interfaces in the 1panel led to RCE.
Code audit process
- First we go to the Agent HTTP routing fileagent/init/router/router.go
- It was found that the Routersreference function in the function Certificatewas globally checked.agent/middleware/certificate.go
- The discovery Certificatefunction determines c.Request.TLS.HandshakeCompletewhether certificate communication has been performed
- Since c.Request.TLS.HandshakeCompletethe true or false judgment is determined by agent/server/server.gothe code Startfunctiontls.RequireAnyClientCert
Note::Here due to the use of tls.RequireAnyClientCert instead of tls.RequireAndVerifyClientCert,RequireAnyClientCert Only require the client to provide a certificate,Does not verify the issuance of certificates CA,So any self assigned certificate will pass TLS handshake。
- The subsequent Certificatefunction only verified that the CN field of the certificate was panel_client, without verifying the certificate issuer. Finally, it was discovered that the WebSocket connection could bypass Proxy-ID verification.
- Process WebSocket interface (based on the above questions, all processes and other sensitive information can be obtained) routing address: /process/ws the request format is as follows
{
"type": "ps", // 数据类型: ps(进程), ssh(SSH会话), net(网络连接), wget(下载进度)
"pid": 123, // 可选,指定进程ID进行筛选
"name": "process_name", // 可选,根据进程名筛选
"username": "user" // 可选,根据用户名筛选
}
- Terminal SSH WebSocket interface (according to the above problem, any command can be executed) routing address: /hosts/terminal the request format is as follows
{
"type": "cmd",
"data": "d2hvYW1pCg==" // "whoami" 的base64编码,记住不要忘记回车。
}
-
Container Terminal WebSocket interface (container execution command interface) routing address:/containers/terminal
-
File Download Process WebSocket interface (automatically push download progress information) routing address:/files/wget/process
Attack process
-
First generate a fake certificate openssl req -x509 -newkey rsa:2048 -keyout panel_client.key -out panel_client.crt -days 365 -nodes -subj "/CN=panel_client"
-
Then use the certificate to request verification. If the websocket interface is successfully connected, there is a vulnerability.
The vulnerability can be exploited over the network without needing physical access. It is difficult for an attacker to exploit this vulnerability and may require special conditions. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a high impact on the availability of the system.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard