7.5high
1Panel arbitrary file write vulnerability exists in the background
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.83% (higher than 58% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hf7j-xj3w-87g4GO-2023-2006
Description
1Panel is an open source Linux server operation and maintenance management panel. In version 1.4.3, 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 `recieves JSON data sent by users in the form of a POST request. And the lack of parameter filtering allows for arbitrary file write operations. Version 1.5.0 contains a patch for this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| 1Panel-dev 1Panel | = 1.4.3 | CVE List |
| fit2cloud 1panel | 1.4.3 | CVE List, NVD |
| github.com/1Panel-dev/1Panel (Go) | from 1.4.3 before 1.5.0 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
1Panel is an open source Linux server operation and maintenance management panel. In version 1.4.3, 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 `recieves JSON data sent by users in the form of a POST request. And the lack of parameter filtering allows for arbitrary file write operations. Version 1.5.0 contains a patch for this issue.
GitHub Advisory Database
Summary
An arbitrary file write vulnerability could lead to direct control of the server
Details
Arbitrary file creation
In the api/v1/file.go file, there is a function called SaveContentthat,It recieves JSON data sent by users in the form of a POST request. And the lack of parameter filtering allows for arbitrary file write operations.It looks like this:
- Vulnerable Code
PoC
- We can write the SSH public key into the /etc/.root/authorized_keys configuration file on the server.
-
The server was successfully written to the public key 微信图片_20230801093610
-
Successfully connected to the target server using an SSH private key. 微信图片_20230801093933 微信图片_20230801094037
As a result, the server is directly controlled, causing serious harm
Impact
1Panel v1.4.3
Go Vulnerability Database
1Panel arbitrary file write vulnerability in github.com/1Panel-dev/1Panel
NVD (es)
1Panel es un panel de gestión de operación y mantenimiento de servidores Linux de código abierto. En la versión 1.4.3, una vulnerabilidad de escritura de archivos arbitraria podría llevar al control directo del servidor. En el archivo `api/v1/file.go`, hay una función llamada `SaveContent que `recibe datos JSON enviados por los usuarios en forma de solicitud POST. Y la falta de filtrado de parámetros permite operaciones de escritura de archivos arbitrarias. La versión 1.5.0 contiene un parche para este problema.
References
| https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-hf7j-xj3w-87g4 | advisory, exploit, vendor-advisory, web | |
| https://github.com/1Panel-dev/1Panel/releases/tag/v1.5.0 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-39966 | advisory | |
| https://github.com/1Panel-dev/1Panel | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-39966 changed 2024-10-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hf7j-xj3w-87g4 changed 2024-08-21 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2023-2006 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2023-39966 changed 2026-06-17 | Public domain |