9.8critical
Dpanel's hard-coded JWT secret leads to remote code execution
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.90% (higher than 60% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-j752-cjcj-w847GO-2025-3612
Description
Dpanel is a Docker visualization panel system which provides complete Docker management functions. The Dpanel service contains a hardcoded JWT secret in its default configuration, allowing attackers to generate valid JWT tokens and compromise the host machine. 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. This issue is patched in version 1.6.1. A workaround for this vulnerability involves replacing the hardcoded secret with a securely generated value and load it from secure configuration storage.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| donknap dpanel | < 1.6.1 | CVE List |
| github.com/donknap/dpanel (Go) | before 1.6.1 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
Dpanel is a Docker visualization panel system which provides complete Docker management functions. The Dpanel service contains a hardcoded JWT secret in its default configuration, allowing attackers to generate valid JWT tokens and compromise the host machine. 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. This issue is patched in version 1.6.1. A workaround for this vulnerability involves replacing the hardcoded secret with a securely generated value and load it from secure configuration storage.
GitHub Advisory Database
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:
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.
Go Vulnerability Database
Dpanel's hard-coded JWT secret leads to remote code execution in github.com/donknap/dpanel
NVD (es)
Dpanel es un sistema de panel de visualización de Docker que proporciona funciones completas de gestión de Docker. El servicio Dpanel contiene un secreto JWT codificado en su configuración predeterminada, lo que permite a los atacantes generar tokens JWT válidos y comprometer el equipo host. Esta falla de seguridad permite a los atacantes analizar el código fuente, descubrir el secreto incrustado y crear tokens JWT legítimos. Al falsificar estos tokens, un atacante puede eludir los mecanismos de autenticación, suplantar a usuarios con privilegios y obtener acceso administrativo no autorizado. En consecuencia, esto permite el control total del equipo host, lo que puede conllevar graves consecuencias, como la exposición de datos confidenciales, la ejecución no autorizada de comandos, la escalada de privilegios o un mayor movimiento lateral dentro del entorno de red. Este problema está corregido en la versión 1.6.1. Un workaround para esta vulnerabilidad consiste en reemplazar el secreto codificado con un valor generado de forma segura y cargarlo desde un almacenamiento de configuración seguro.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-30206 changed 2025-04-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-j752-cjcj-w847 changed 2025-04-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3612 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2025-30206 changed 2026-06-17 | Public domain |