From 297abd5b717a166c62e5d079e02ca60891e5c51c Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 14:19:22 +0000 Subject: [PATCH] Publish GHSA-j752-cjcj-w847 --- .../GHSA-j752-cjcj-w847.json | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 advisories/github-reviewed/2025/04/GHSA-j752-cjcj-w847/GHSA-j752-cjcj-w847.json diff --git a/advisories/github-reviewed/2025/04/GHSA-j752-cjcj-w847/GHSA-j752-cjcj-w847.json b/advisories/github-reviewed/2025/04/GHSA-j752-cjcj-w847/GHSA-j752-cjcj-w847.json new file mode 100644 index 00000000000..049fb6601e3 --- /dev/null +++ b/advisories/github-reviewed/2025/04/GHSA-j752-cjcj-w847/GHSA-j752-cjcj-w847.json @@ -0,0 +1,59 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-j752-cjcj-w847", + "modified": "2025-04-15T14:17:25Z", + "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": "PACKAGE", + "url": "https://github.com/donknap/dpanel" + } + ], + "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": null + } +} \ No newline at end of file