Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1oZjdqLXhqM3ctODdnNM4AA1OF
1Panel arbitrary file write vulnerability
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
-
Successfully connected to the target server using an SSH private key.
As a result, the server is directly controlled, causing serious harm
Impact
1Panel v1.4.3
Permalink: https://github.com/advisories/GHSA-hf7j-xj3w-87g4JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1oZjdqLXhqM3ctODdnNM4AA1OF
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 1 year ago
Updated: about 1 year ago
CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS Percentage: 0.00265
EPSS Percentile: 0.65287
Identifiers: GHSA-hf7j-xj3w-87g4, CVE-2023-39966
References:
- https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-hf7j-xj3w-87g4
- https://nvd.nist.gov/vuln/detail/CVE-2023-39966
- https://github.com/1Panel-dev/1Panel/releases/tag/v1.5.0
- https://github.com/advisories/GHSA-hf7j-xj3w-87g4
Blast Radius: 1.0
Affected Packages
go:github.com/1Panel-dev/1Panel
Dependent packages: 1Dependent repositories: 0
Downloads:
Affected Version Ranges: = 1.4.3
Fixed in: 1.5.0
All affected versions:
All unaffected versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6