PT-2023-27178 · 1Panel · 1Panel

·

CVE-2023-39966

·

Published

2023-08-10

·

Updated

2024-08-21

CVSS v3.1

7.5

High

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Name of the Vulnerable Software and Affected Versions 1Panel versions 1.4.3
Description An arbitrary file write vulnerability could lead to direct control of the server. In the api/v1/file.go file, there is a function called SaveContentthat,It that receives JSON data sent by users in the form of a POST request. The lack of parameter filtering allows for arbitrary file write operations. This issue can be exploited by writing the SSH public key into the /etc/.root/authorized keys configuration file on the server, allowing for direct control of the server.
Recommendations For version 1.4.3, update to version 1.5.0 to resolve the issue. As a temporary workaround, consider restricting access to the api/v1/file.go file or disabling the SaveContentthat,It function until a patch is applied. Avoid using the vulnerable API endpoint until the issue is resolved.

Exploit

Fix

Missing Authorization

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2023-39966
GHSA-HF7J-XJ3W-87G4
GO-2023-2006

Affected Products

1Panel