High, CVSS 7.7GoPublished
RatPanel can perform remote command execution without authorization
CVE-2025-53534 · GHSA-fm3m-jrgm-5ppg
- Affected
- Go github.com/tnborg/panel >= 2.3.19, < 2.5.6; >= 0.0.0-20241111062800-91ecd04c2700, < 0.0.0-20250707071915-4985eb2e1f38
- Fixed in
- 0.0.0-20250707071915-4985eb2e1f382.5.6· Vendor fix available
- Issue
- When an attacker obtains the backend login path of RatPanel (including but not limited to weak default paths, brute-force cracking, etc.), they can execute system commands or take over hosts managed by the panel without logging in. In addition to this remote code execution (RCE) vulnerability, the flawed code also leads to unauthorized access. Details In Go, r.URL.Path retrieves the part of the URL that comes after the port and before the query parameters or anchor symbols. For example, in the URL http://localhost:8080/api/ws/ssh?id=1, the retrieved path would be /api/ws/ssh. However, if the request is made to http://localhost:8080//api/ws/ssh?id=1, the parsed r.URL.Path would be //api/ws/ssh. RatPanel uses the CleanPath middleware provided by github.com/go-chi/chi package to clean URLs, The route path inside the chi router will be cleaned to /api/ws/ssh, but this middleware does not process r.URL.Path, so the path is still //api/ws/ssh. In the mustlogin middleware, RatPanel…
Recommended action: Upgrade to 2.5.6 or 0.0.0-20250707071915-4985eb2e1f38 (pre-release) by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.