CVE-2024-2352: Github.com/1Panel dev/1Panel 1Panel Is Vulnerable To Command Vulnerability

MODERATE
Advisory Identifier: GHSA-x2vg-5wrf-vj6v
CVSS 6.3
CWE-77
Published
Advisory Summary

CVE-2024-2352 is a MODERATE (CVSS 6.3) 1panel is vulnerable to command vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Github.com/1Panel dev/1Panel libraries in the Go ecosystem. The issue involves 1panel is vulnerable to command injection. Remediation is available by upgrading affected packages to version 1.10.1-lts.

CVE-2024-2352 at a Glance

CVE Identifier CVE-2024-2352
GHSA Identifier GHSA-x2vg-5wrf-vj6v
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Github.com/1Panel dev/1Panel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.3

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:N/S:U/C:L/I:L/A:L).

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

How to Fix CVE-2024-2352

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.10.1-lts
Upgrade github.com/1Panel-dev/1Panel to 1.10.1-lts
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-2024-2352, 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.10.1-lts), 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-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. 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

1Panel is vulnerable to command injection. This vulnerability has been classified as critical, has been found in 1Panel up to 1.10.1-lts. Affected by this issue is the function baseApi.UpdateDeviceSwap of the file /api/v1/toolbox/device/update/swap. The manipulation of the argument Path with the input 123123123\nopen -a Calculator leads to command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-256304.

CVE-2024-2352 Affected Github.com/1Panel dev/1Panel Versions

1 component(s)
Fixed Versions:
1.10.1-lts
Product / Package Ecosystem Affected Versions Fixed Version
github.com/1Panel-dev/1Panel
Go
< 1.10.1-lts
1.10.1-lts

References

Frequently Asked Questions

What is CVE-2024-2352?
CVE-2024-2352 is a security vulnerability in Github.com/1Panel dev/1Panel involving 1Panel is vulnerable to command injection under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Github.com/1Panel dev/1Panel versions are affected?
Affected versions include releases prior to 1.10.1-lts across affected packages: github.com/1Panel-dev/1Panel.
What version fixes CVE-2024-2352?
Upgrading to 1.10.1-lts (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.10.1-lts. Upgrade your dependency to 1.10.1-lts or later.
What is the CVSS score of CVE-2024-2352?
CVE-2024-2352 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2024-2352?
CVE-2024-2352 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check Go dependencies for CVE-2024-2352?
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-x2vg-5wrf-vj6v",
  "modified" : "2024-03-11T14:00:13Z",
  "published" : "2024-03-10T03:30:45Z",
  "aliases" : [ "CVE-2024-2352" ],
  "summary" : "1Panel is vulnerable to command injection ",
  "details" : "1Panel is vulnerable to command injection. This vulnerability has been classified as critical, has been found in 1Panel up to 1.10.1-lts. Affected by this issue is the function baseApi.UpdateDeviceSwap of the file /api/v1/toolbox/device/update/swap. The manipulation of the argument Path with the input 123123123\\nopen -a Calculator leads to command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-256304.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/1Panel-dev/1Panel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.1-lts"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-2352"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/1Panel-dev/1Panel/pull/4131"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/1Panel-dev/1Panel/pull/4131#issue-2176105990"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/1Panel-dev/1Panel/pull/4131/commits/0edd7a9f6f5100aab98a0ea6e5deedff7700396c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/1Panel-dev/1Panel"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.256304"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.256304"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-11T14:00:13Z",
    "nvd_published_at" : "2024-03-10T02:16:08Z"
  }
}