CVE-2023-39966
JSON

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 packageVersionsReported by
1Panel-dev 1Panel= 1.4.3CVE List
fit2cloud 1panel1.4.3CVE List, NVD
github.com/1Panel-dev/1Panel (Go)from 1.4.3 before 1.5.0GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-862

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

微信图片_20230801092544

PoC

  • We can write the SSH public key into the /etc/.root/authorized_keys configuration file on the server.

微信图片_20230801093243

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

Sources

SourceRecordLicence
CVE ListCVE-2023-39966 changed 2024-10-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-hf7j-xj3w-87g4 changed 2024-08-21CC-BY-4.0
Go Vulnerability DatabaseGO-2023-2006 changed 2026-03-03CC-BY-4.0
NVDCVE-2023-39966 changed 2026-06-17Public domain