CVE-2023-39965: Github.com/1Panel dev/1Panel 1Panel Arbitrary File Download Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-85cf-gj29-f555
CVSS 6.5
CWE-863
Published
Advisory Summary

CVE-2023-39965 is a MODERATE (CVSS 6.5) 1panel arbitrary file download vulnerability vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/1Panel dev/1Panel libraries in the Go ecosystem. The issue involves 1panel arbitrary file download vulnerability. Remediation is available by upgrading affected packages to version 1.5.0.

CVE-2023-39965 at a Glance

CVE Identifier CVE-2023-39965
GHSA Identifier GHSA-85cf-gj29-f555
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/1Panel dev/1Panel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-39965

To remediate this vulnerability, upgrade all affected Github.com/1Panel dev/1Panel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/1Panel-dev/1Panel fixed: 1.5.0
Upgrade github.com/1Panel-dev/1Panel to 1.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/1Panel-dev/1Panel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-39965, inspect your project dependencies for Github.com/1Panel dev/1Panel:

inspect dependencies for github.com/1Panel-dev/1Panel

Analyze the terminal output to locate any version of Github.com/1Panel dev/1Panel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/1Panel dev/1Panel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Any file downloading vulnerability exists in 1Panel backend. ### Details Authenticated attackers can download arbitrary files through the API interface. This code has unauthorized access. ![image](https://user-images.githubusercontent.com/116613486/257246024-d0e35800-5fd8-4907-8b1b-504afaad859e.png) ### PoC payload: POST /api/v1/files/download/bypath HTTP/1.1 Host: ip Content-Type: application/json {"path":"/etc/passwd"} ![f77959349e96543436eea18283fa75c](https://user-images.githubusercontent.com/116613486/257245459-13f2f31b-fcfe-4a27-ba52-e2f1e5d4d749.png) ### Impact Attackers can freely download the file content on the target system. This will be caused a large amount of information leakage.

CVE-2023-39965 Affected Github.com/1Panel dev/1Panel Versions

1 component(s)
Fixed Versions:
1.5.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/1Panel-dev/1Panel
Go
≥ 1.4.3
< 1.5.0
All 1 versions
1.4.3
1.5.0

References

Frequently Asked Questions

What is CVE-2023-39965?
CVE-2023-39965 is a security vulnerability in Github.com/1Panel dev/1Panel involving 1Panel Arbitrary File Download vulnerability under CWE-863: Incorrect Authorization.
Which Github.com/1Panel dev/1Panel versions are affected?
Affected versions include releases prior to 1.5.0 across affected packages: github.com/1Panel-dev/1Panel.
What version fixes CVE-2023-39965?
Upgrading to 1.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/1Panel-dev/1Panel affected?
Yes, github.com/1Panel-dev/1Panel is affected in releases prior to 1.5.0. Upgrade your dependency to 1.5.0 or later.
What is the CVSS score of CVE-2023-39965?
CVE-2023-39965 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2023-39965?
CVE-2023-39965 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2023-39965?
Run the dependency tree command: 'inspect dependencies for github.com/1Panel-dev/1Panel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-85cf-gj29-f555",
  "modified" : "2023-08-10T20:09:24Z",
  "published" : "2023-08-10T20:09:24Z",
  "aliases" : [ "CVE-2023-39965" ],
  "summary" : "1Panel Arbitrary File Download vulnerability",
  "details" : "### Summary\nAny file downloading vulnerability exists in 1Panel backend.\n\n### Details\nAuthenticated attackers can download arbitrary files through the API interface. This code has unauthorized access.\n![image](https://user-images.githubusercontent.com/116613486/257246024-d0e35800-5fd8-4907-8b1b-504afaad859e.png)\n\n### PoC\npayload:\n\nPOST /api/v1/files/download/bypath HTTP/1.1\nHost: ip\nContent-Type: application/json\n\n{\"path\":\"/etc/passwd\"}\n\n![f77959349e96543436eea18283fa75c](https://user-images.githubusercontent.com/116613486/257245459-13f2f31b-fcfe-4a27-ba52-e2f1e5d4d749.png)\n\n\n### Impact\nAttackers can freely download the file content on the target system. This will be caused a large amount of information leakage.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/1Panel-dev/1Panel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.3"
      }, {
        "fixed" : "1.5.0"
      } ]
    } ],
    "versions" : [ "1.4.3" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-85cf-gj29-f555"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-39965"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/1Panel-dev/1Panel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/1Panel-dev/1Panel/releases/tag/v1.5.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-10T20:09:24Z",
    "nvd_published_at" : "2023-08-10T18:15:11Z"
  }
}