CVE-2025-30206: Github.com/donknap/dpanel Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-j752-cjcj-w847
CVSS 9.8
CWE-321 CWE-453 CWE-547
Published
Advisory Summary

CVE-2025-30206 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-321: Use of Hard-coded Cryptographic Key) affecting Github.com/donknap/dpanel libraries in the Go ecosystem. The issue involves dpanel's hard-coded jwt secret leads to remote code execution. Remediation is available by upgrading affected packages to version 1.6.1.

CVE-2025-30206 at a Glance

CVE Identifier CVE-2025-30206
GHSA Identifier GHSA-j752-cjcj-w847
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-321: Use of Hard-coded Cryptographic Key
Affected Product Github.com/donknap/dpanel
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2025-30206

To remediate this vulnerability, upgrade all affected Github.com/donknap/dpanel 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/donknap/dpanel fixed: 1.6.1
Upgrade github.com/donknap/dpanel to 1.6.1
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/donknap/dpanel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-30206, inspect your project dependencies for Github.com/donknap/dpanel:

inspect dependencies for github.com/donknap/dpanel

Analyze the terminal output to locate any version of Github.com/donknap/dpanel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.1), 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-321: Use of Hard-coded Cryptographic Key, where the product uses a hard-coded, unchangeable cryptographic key. In Github.com/donknap/dpanel, 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 The Dpanel service contains a hardcoded JWT secret in its default configuration, allowing attackers to generate valid JWT tokens and compromise the host machine. ### Details The Dpanel service, when initiated using its default configuration, includes a hardcoded JWT secret embedded directly within its source code. This security flaw allows attackers to analyze the source code, discover the embedded secret, and craft legitimate JWT tokens. By forging these tokens, an attacker can successfully bypass authentication mechanisms, impersonate privileged users, and gain unauthorized administrative access. Consequently, this enables full control over the host machine, potentially leading to severe consequences such as sensitive data exposure, unauthorized command execution, privilege escalation, or further lateral movement within the network environment. It is recommended to replace the hardcoded secret with a securely generated value and load it from secure configuration storage to mitigate this vulnerability. ### PoC The core code snippet is shown below: ```python import jwt def generate_jwt(appname): payload = { "SECRET_KEY":"SECRET_VALUE", } print("appname:", appname) print("payload:", str(payload)) token = jwt.encode(payload, SECRET_KEY.format(APP_NAME=appname), algorithm="HS256") return token appname = "SECRET_KEY" token = generate_jwt(appname) print("url token:", token) ``` ### Impact Attackers who successfully exploit this vulnerability can write arbitrary files to the host machine's file system, and all users with Dpanel versions less than 1.6.1 are affected.

CVE-2025-30206 Affected Github.com/donknap/dpanel Versions

1 component(s)
Fixed Versions:
1.6.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/donknap/dpanel
Go
< 1.6.1
1.6.1

References

Frequently Asked Questions

What is CVE-2025-30206?
CVE-2025-30206 is a security vulnerability in Github.com/donknap/dpanel involving Dpanel's hard-coded JWT secret leads to remote code execution under CWE-321: Use of Hard-coded Cryptographic Key.
Which Github.com/donknap/dpanel versions are affected?
Affected versions include releases prior to 1.6.1 across affected packages: github.com/donknap/dpanel.
What version fixes CVE-2025-30206?
Upgrading to 1.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/donknap/dpanel affected?
Yes, github.com/donknap/dpanel is affected in releases prior to 1.6.1. Upgrade your dependency to 1.6.1 or later.
What is the CVSS score of CVE-2025-30206?
CVE-2025-30206 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-30206?
CVE-2025-30206 is classified under CWE-321: Use of Hard-coded Cryptographic Key (The product uses a hard-coded, unchangeable cryptographic key.).
How can I check Go dependencies for CVE-2025-30206?
Run the dependency tree command: 'inspect dependencies for github.com/donknap/dpanel'. 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-j752-cjcj-w847",
  "modified" : "2025-04-23T15:09:48Z",
  "published" : "2025-04-15T14:17:25Z",
  "aliases" : [ "CVE-2025-30206" ],
  "summary" : "Dpanel's hard-coded JWT secret leads to remote code execution",
  "details" : "### Summary\nThe Dpanel service contains a hardcoded JWT secret in its default configuration, allowing attackers to generate valid JWT tokens and compromise the host machine.\n\n### Details\nThe Dpanel service, when initiated using its default configuration, includes a hardcoded JWT secret embedded directly within its source code. This security flaw allows attackers to analyze the source code, discover the embedded secret, and craft legitimate JWT tokens. By forging these tokens, an attacker can successfully bypass authentication mechanisms, impersonate privileged users, and gain unauthorized administrative access. Consequently, this enables full control over the host machine, potentially leading to severe consequences such as sensitive data exposure, unauthorized command execution, privilege escalation, or further lateral movement within the network environment. It is recommended to replace the hardcoded secret with a securely generated value and load it from secure configuration storage to mitigate this vulnerability.\n\n\n### PoC\nThe core code snippet is shown below:\n```python\nimport jwt\n\ndef generate_jwt(appname):\n\n    payload = {\n        \"SECRET_KEY\":\"SECRET_VALUE\",\n    }\n    print(\"appname:\", appname)\n    print(\"payload:\", str(payload))\n    token = jwt.encode(payload, SECRET_KEY.format(APP_NAME=appname), algorithm=\"HS256\")\n    return token\n\nappname = \"SECRET_KEY\"\ntoken = generate_jwt(appname)\nprint(\"url token:\", token)\n```\n\n### Impact\nAttackers who successfully exploit this vulnerability can write arbitrary files to the host machine's file system, and all users with Dpanel versions less than 1.6.1 are affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/donknap/dpanel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/donknap/dpanel/security/advisories/GHSA-j752-cjcj-w847"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-30206"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/donknap/dpanel"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3612"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-321", "CWE-453", "CWE-547" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-15T14:17:25Z",
    "nvd_published_at" : "2025-04-15T20:15:39Z"
  }
}