/

CVE-2026-24840

Severity:

HIGH RISK

(8.0)

Hardcoded Credentials in Dokploy Installation Script

CVE-2026-24840

Analyzed

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Unauthorized Access to Database and Platform Compromise

Severity:

HIGH RISK

(8.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dokploy versions prior to 0.26.6 include a hardcoded password in the official installation script when creating the database container, resulting in nearly identical credentials across deployments.

If an attacker can reach the Dokploy database service, they can attempt these known default credentials to gain unauthorized access and potentially compromise the platform and hosted applications.

Affected context

This vulnerability affects Dokploy installations created using the official installation script (install.sh) in versions prior to 0.26.6.

The issue occurs when the script launches the database container with a hardcoded password, leading to predictable credentials across many deployments.

It is most risky when the database is network-accessible (e.g., exposed to the internet, shared networks, or reachable from other compromised services) and when no additional network or access controls are in place.

Exploit preconditions

  • Attack surface: Database service launched by Dokploy (typically a containerized database instance).
  • Required access: Network connectivity to the database endpoint (from the internet, internal network, or another compromised container/host).
  • Trigger point: An attacker attempts authentication using the known hardcoded username/password combination set by the installation script.
  • Why exploitation is possible: The installation script uses a fixed, publicly known credential, so many deployments share the same database password with no requirement to change it during setup.

Why this happens

The vulnerability stems from the use of hardcoded credentials within deployment automation, matching CWE-798: Use of Hard-coded Credentials.

Instead of generating unique secrets or requiring the operator to supply a password at install time, the script embeds a static password value in the database container configuration.

This pattern converts what should be a private secret into effectively public information, making authentication a weak security boundary and enabling credential guessing without effort.

Potential impact

  • Unauthorized access to the Dokploy database using known default credentials
  • Reading or modification of application configuration, secrets, or operational metadata stored in the database
  • Escalation to full control of the Dokploy platform via tampering with stored data (e.g., accounts, permissions, deployment configs)
  • Data exfiltration of sensitive information belonging to applications managed by Dokploy
  • Use of the compromised platform as a pivot point for further attacks within the hosting environment

General mitigation guidance

Effective mitigation focuses on eliminating shared, predictable secrets and tightening access around the database service:

  • Replace hardcoded credentials with unique, deployment-specific passwords or randomly generated secrets at installation time.
  • Require interactive or configuration-driven secret input during setup rather than silently applying defaults.
  • Store credentials in a dedicated secrets management mechanism rather than in scripts or images.
  • Restrict network exposure of the database service to only the components that require it (e.g., private network segments, firewall rules).
  • Apply least-privilege roles to database users so that compromise of one account has limited blast radius.

How teams detect issues like this

Organizations can detect this class of issue and its manifestations using:

  • Static analysis or script review to flag hardcoded passwords, API keys, or connection strings in installation scripts and infrastructure code.
  • Configuration audits of running deployments to identify default or shared credentials and ensure passwords differ from known public values.
  • Secrets-scanning tools integrated into CI/CD pipelines to detect embedded credentials in repositories and deployment artifacts.
  • Network security monitoring for repeated or anomalous logins using known default credential patterns against database services.

Sources

SourceLink
github.comgithub.com/Dokploy/dokploy/commit/b902c160a256ad345ac687c87eb092f1fab2c64d
github.comgithub.com/Dokploy/dokploy/security/advisories/GHSA-jr65-3j3w-gjmc

Frequently asked

questions

It can be, if the Dokploy database service is reachable over the network from the attacker's location. When the database is exposed to the internet or a shared internal network, an attacker may directly authenticate using the known default credentials.

An attacker typically only needs network-level access to the database endpoint. No prior authentication to Dokploy itself is required if they can reach the database service and the default credentials are still in use.

Move away from hardcoded secrets by ensuring each deployment uses unique, strong credentials generated or supplied during installation, and store those secrets in a secure mechanism outside of scripts or code.

Establish policies that prohibit hardcoded credentials in code and deployment scripts, enforce secrets scanning in CI/CD, mandate configurable or auto-generated passwords for all services, and routinely review default configurations to avoid shipping predictable or shared secrets.

Find out what's already
exploitable in your codebase.