Deployment guide

Dokploy CVE-2026: Critical Update to 0.29.13

Deploy on a VPS Cloud →

Tutorial

Dokploy CVE-2026: Critical Update to 0.29.13

Security & Monitoring11 min read6 steps

GitHub advisories GHSA-w3gm-rc4p-9rhj and GHSA-7r6p-v9gw-pwc8, published on September 25, 2026, expose an unprecedented attack scenario on Dokploy: a JWT secret hardcoded in the source code since version 0.27.0 allows any attacker to forge a valid admin token without any account, and unauthorized WebSocket handlers then turn that token into a root shell on the host. Any Dokploy instance below 0.29.13 is compromised from any network, with no interaction required. The fix takes two commands and one secret rotation.

Contents· Two critical CVEs, one complete exploit chain1/13
  1. 01Two critical CVEs, one complete exploit chain
  2. 02CVE-2026-45631 (CVSS 10.0): the hardcoded JWT secret
  3. 03Check if your instance is exposed to CVE-2026-45631
  4. 04CVE-2026-72863 (CVSS 9.9): escalation via WebSocket terminals
  5. 05The complete attack scenario: from zero access to root
  6. 06Versions and patch matrix
  7. 07Diagnosing your instance before applying the patch
  8. 08Step-by-step update guide to Dokploy 0.29.13
  9. 09Post-patch hardening measures
  10. 10Is Dokploy still reliable despite these CVEs?
  11. 11Alternatives if you are considering migrating
  12. 12On a ServOrbit VPS, the patch comes down to two commands
  13. 13Summary: the non-negotiables

Two critical CVEs, one complete exploit chain

On September 25, 2026, two security advisories were published simultaneously for Dokploy, the self-hosted deployment tool that competes with Heroku and Render. The combination of the two constitutes the most severe threat to hit the self-hosted PaaS ecosystem in 2026: no account required, root on the host in under a minute, and every instance below version 0.29.13 is exposed.

CVE-2026-45631 (CVSS 10.0) concerns a JWT secret hardcoded in the source code. CVE-2026-72863 (CVSS 9.9) concerns WebSocket handlers that authenticate without authorizing. Taken separately, each is already critical. Chained together, they form a complete attack: the first provides administrative identity, the second provides execution.

CVE-2026-45631 (CVSS 10.0): the hardcoded JWT secret

GitHub advisory GHSA-w3gm-rc4p-9rhj describes a CWE-798 vulnerability — use of hardcoded credentials. Dokploy uses the better-auth library for session and JWT token management. In versions 0.27.0 through 0.29.2 inclusive, the default value for the BETTER_AUTH_SECRET variable was left as better-auth-secret-123456789 in the publicly published source code.

This value is what signs all Dokploy administration JWT tokens. Anyone who knows it — and it has been public since the first commit of version 0.27.0 — can forge a valid JWT token with administrator rights, without holding any account on the target instance. Dokploy's admin API then accepts all requests: reading all deployment secrets, executing commands via the API, modifying service configurations.

A CVSS score of 10.0 is the absolute maximum. It reflects the complete absence of any barrier: the attack vector is network, no user interaction is required, no prior authentication is needed, and the confidentiality, integrity, and availability of the host are all compromised.

Check if your instance is exposed to CVE-2026-45631

On the Dokploy host, run: grep BETTER_AUTH_SECRET /etc/dokploy/.env

If the displayed value is better-auth-secret-123456789, if the variable is absent from the file, or if the .env file predates version 0.29.3 without having been regenerated: your instance is exposed. The binary version alone is not sufficient — an update without secret rotation leaves the old value in place.

CVE-2026-72863 (CVSS 9.9): escalation via WebSocket terminals

GitHub advisory GHSA-7r6p-v9gw-pwc8 describes insufficient access control on WebSocket handlers exposing Dokploy's Docker terminals. The vulnerability is class CWE-285 — improper authorization.

Dokploy allows each user to access an interactive terminal in their containers via WebSocket. The check in place authenticated the user — it confirmed the presence of a valid token — but did not authorize: it did not verify that the requested service actually belongs to the requesting user. Any user with a valid account, even without administrative rights, could therefore open a terminal in any container belonging to any other user.

The actual impact goes beyond the container itself. Dokploy runs as root and mounts the host Docker socket (/var/run/docker.sock). From a shell inside a container, the command docker run --rm -v /:/host alpine chroot /host sh yields a root shell on the host filesystem. All versions below 0.29.13 are affected.

The complete attack scenario: from zero access to root

The CVE-2026-45631 + CVE-2026-72863 chain constitutes a complete attack achievable from any network, without a pre-existing account, in two steps.

Step 1 — Forge an admin token (CVE-2026-45631). The attacker knows the value better-auth-secret-123456789 from the public source code. They generate a JWT signed with this value, claiming the admin role. Dokploy's API accepts this token without further verification. The attacker now has full administrative access: list of all services, environment secrets, deployment keys.

Step 2 — Access a container terminal (CVE-2026-72863). With the forged admin token, the attacker opens a WebSocket connection to an arbitrary container's terminal. The absent authorization check lets the request through. The attacker has a shell inside the container.

Result — Root on the host. With Dokploy running as root with the Docker socket mounted, the attacker pivots from the container to the host. The entire filesystem, secrets from all hosted projects, SSH keys, and production environment variables are accessible. The entire operation requires no operator interaction and no pre-existing account on the instance.

Versions and patch matrix

Scroll the table

CVECVSSAffected versionsFixed versionRequired action
CVE-2026-4563110.0 — CRITICAL0.27.0 – 0.29.2≥ 0.29.3Update + regenerate BETTER_AUTH_SECRET
CVE-2026-728639.9 — CRITICAL< 0.29.13≥ 0.29.13Update to 0.29.13 minimum
Full chain10.0 effective< 0.29.13 with default secret≥ 0.29.13Update + secret rotation

Diagnosing your instance before applying the patch

Before proceeding with the update, accurately assess your instance's exposure.

Check the installed version: docker exec dokploy cat /app/package.json | grep '"version"'

If the version displayed is below 0.29.13, your instance is vulnerable to CVE-2026-72863. If it falls between 0.27.0 and 0.29.2, it is vulnerable to both CVEs simultaneously.

Check the JWT secret value: grep BETTER_AUTH_SECRET /etc/dokploy/.env

If the value is better-auth-secret-123456789 or the variable is absent, CVE-2026-45631 is actively exploitable on your instance regardless of the version.

Check network exposure: if your Dokploy interface is accessible from the Internet without IP restriction (firewall, Cloudflare Access, VPN), the attack surface is public. An attacker needs no prior network access to exploit CVE-2026-45631.

Step-by-step update guide to Dokploy 0.29.13

  1. Back up configuration and data

    Before any operation, create a full backup.

    # Back up the configuration directory
    cp -r /etc/dokploy /etc/dokploy.bak-$(date +%Y%m%d-%H%M)
    
    # Back up the Dokploy database
    docker exec dokploy-postgres pg_dump -U dokploy dokploy > /root/dokploy-db-$(date +%Y%m%d).sql

    Keep these backups off the Dokploy host — if the instance is compromised, local backups are accessible to the attacker.

  2. Check the current version and docker-compose.yml

    Identify the installation method and pinned version in your Compose file. Most Dokploy installations use the official dokploy/dokploy image. If a version tag is pinned in docker-compose.yml, note it.

    cat /etc/dokploy/docker-compose.yml | grep 'image:'
  3. Update the Dokploy image

    From the Dokploy configuration directory:

    cd /etc/dokploy
    docker compose pull

    This command downloads the dokploy/dokploy:latest image or the pinned tag. To explicitly pin the fixed version, update the image line in docker-compose.yml: replace the existing tag with dokploy/dokploy:0.29.13 before running the pull.

  4. Restart the containers

    cd /etc/dokploy
    docker compose down
    docker compose up -d

    Wait for the containers to reach a healthy state before continuing:

    docker compose ps

    Both Dokploy and its PostgreSQL database must show Up or healthy.

  5. Regenerate the BETTER_AUTH_SECRET variable

    This is the most important and most frequently skipped step. An update without secret rotation leaves CVE-2026-45631 exploitable. Generate a new cryptographically secure random value:

    openssl rand -base64 48

    Copy the generated value. Open /etc/dokploy/.env and replace the BETTER_AUTH_SECRET=... line with the new value. If the variable is absent from the file, add it.

    Then restart Dokploy to apply the change:

    cd /etc/dokploy && docker compose down && docker compose up -d

    Note: rotating the secret invalidates all active sessions. Connected users will need to log in again.

  6. Verify the version after update

    Confirm that version 0.29.13 or higher is running:

    docker exec dokploy cat /app/package.json | grep '"version"'

    Also verify the secret has been applied:

    grep BETTER_AUTH_SECRET /etc/dokploy/.env

    The value must no longer be better-auth-secret-123456789. If it still is, the rotation was not applied — repeat the previous step.

Post-patch hardening measures

The update fixes both CVEs. These additional measures reduce the residual attack surface.

Restrict network access to the Dokploy interface. The Dokploy administration interface has no reason to be publicly accessible from the Internet. Limit access to port 3000 (or whichever port you use) to your team's IPs via the host firewall, or place Dokploy behind a VPN.

Enable multi-factor authentication (MFA). Dokploy has supported TOTP since version 0.28.0. Enable it for all administration accounts.

Audit project environment secrets. Dokploy stores the environment variables of your applications. If the instance was exposed during the vulnerability window (versions 0.27.0 to 0.29.12), consider all production secrets potentially read. Rotation recommended for API keys, database tokens, and application secrets.

Docker socket and least-privilege principle. The Docker socket mounted as a volume is a documented and exploited attack surface in CVE-2026-72863. Dokploy requires it to function, but access can be restricted via Docker socket proxy policies like Tecnativa/docker-socket-proxy to limit authorized operations.

Is Dokploy still reliable despite these CVEs?

These two vulnerabilities are serious, but the Dokploy maintainers' response deserves consideration before drawing conclusions about the project's maturity.

The advisories were published on September 25, 2026. The fix for CVE-2026-45631 was available in version 0.29.3, and the fix for CVE-2026-72863 in version 0.29.13 — both within a reasonable timeframe after responsible disclosure. The project maintains a security program via GitHub Security Advisories, indicating minimal maturity in vulnerability management.

Dokploy is a young project (first stable version in 2024) with rapid adoption: over 15,000 GitHub stars and a sustained release cadence. The presence of a hardcoded secret in early versions reflects security debt typical of fast-growing projects where ease of installation took priority over hardening defaults.

The project remains a relevant choice for teams wanting an accessible self-hosted PaaS, provided they follow security updates and apply the hardening measures described in this article.

Alternatives if you are considering migrating

If these vulnerabilities lead you to reconsider your self-hosted PaaS choice, here are the active alternatives in this segment.

Coolify is the closest alternative in terms of features. Open source, actively maintained, with a more mature security model for secret management (no documented hardcoded default value to date). Its interface is more complex but its codebase is larger and more audited.

Caprover is a proven option, older and therefore with a longer security track record. It is less active in terms of new features but more stable.

Portainer with Docker stacks remains a valid approach for teams that do not need a full PaaS. Portainer carries its own historical CVEs — notably around privilege escalation via the Docker API — but version 3.x has revised its authorization management.

Whatever alternative is chosen, applying the same hardening measures (restricted network access, MFA, regular secret rotation) remains the non-negotiable baseline.

On a ServOrbit VPS, the patch comes down to two commands

Running docker compose pull && docker compose up -d from /etc/dokploy, followed by regenerating BETTER_AUTH_SECRET, applies the complete fix. On a VPS with root access, you choose your own maintenance window without depending on a hosting provider. If you deployed Dokploy via the ServOrbit template, the .env file is in /etc/dokploy/ and the docker-compose.yml is the one provided by the template.

Summary: the non-negotiables

CVE-2026-45631 (CVSS 10.0) and CVE-2026-72863 (CVSS 9.9) chain into an accountless-to-root-on-host attack. Any Dokploy instance below 0.29.13 with the default secret better-auth-secret-123456789 is compromisable from any network.

The fix requires two distinct and both mandatory steps: updating to version 0.29.13 minimum (docker compose pull && docker compose up -d), and regenerating BETTER_AUTH_SECRET in the .env file (openssl rand -base64 48). Either one without the other closes only half the surface.

After the update, restrict network access to the administration interface, enable MFA, and if the instance was exposed during the vulnerability window, rotate all hosted application secrets.

Deploy Dokploy on a VPS you control

On a ServOrbit VPS with root access, you apply this patch in two commands at a time of your choosing — without waiting for a maintenance window imposed by a hosting provider. The Dokploy template is available on the Marketplace.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.

Message us on WhatsAppopens in a new tab