CVE-2026-73040

Dockge validates a stack name only on the write path. In backend/stack.ts the allow-list check in validate(), which requires the name to match ^[a-z0-9_-]+$, is reached from save() alone, while the path getter returns path.join(this.server.stacksDir, this.name) and Stack.getStack builds path.join(server.stacksDir, stackName) with no check. The socket handlers in backend/agent-socket-handlers/docker-socket-handler.ts confirm the caller is logged in and that the name is a string, then pass it straight to Stack.getStack, so a name containing traversal sequences resolves outside the managed stacks directory. An authenticated user can therefore read the composeENV and composeYAML values of any directory the server process can reach, which discloses the secrets in that directory's .env or Compose file, and can invoke delete(), which runs docker compose down and then fsAsync.rm on the traversed path with recursive and force set, removing that directory. Disclosure is limited to files named .env or an accepted Compose filename, and deletion requires the target directory to hold a valid Compose file so that docker compose down exits successfully. Dockge commonly runs as root with access to the Docker socket, so the reachable set includes unrelated applications on the host. Instances configured with disableAuth, a supported option that logs the caller in as admin automatically, expose both operations without authentication.
Configurations

No configuration.

History

18 Oct 2026, 20:10

Type Values Removed Values Added
Summary
  • (es) Dockge valida un nombre de pila solo en la ruta de escritura. En backend/stack.ts, la comprobación de lista de permitidos en validate(), que requiere que el nombre coincida con ^[a-z0-9_-]+$, se alcanza solo desde save(), mientras que el captador de ruta devuelve path.join(this.server.stacksDir, this.name) y Stack.getStack construye path.join(server.stacksDir, stackName) sin comprobación. Los gestores de socket en backend/agent-socket-handlers/docker-socket-handler.ts confirman que el llamador ha iniciado sesión y que el nombre es una cadena, luego lo pasan directamente a Stack.getStack, por lo que un nombre que contiene secuencias de recorrido se resuelve fuera del directorio de pilas gestionadas. Un usuario autenticado puede, por lo tanto, leer los valores composeENV y composeYAML de cualquier directorio al que pueda acceder el proceso del servidor, lo que revela los secretos en el archivo .env o Compose de ese directorio, y puede invocar delete(), que ejecuta docker compose down y luego fsAsync.rm en la ruta recorrida con recursive y force establecidos, eliminando ese directorio. La revelación se limita a archivos llamados .env o a un nombre de archivo Compose aceptado, y la eliminación requiere que el directorio de destino contenga un archivo Compose válido para que docker compose down finalice con éxito. Dockge comúnmente se ejecuta como root con acceso al socket de Docker, por lo que el conjunto alcanzable incluye aplicaciones no relacionadas en el host. Las instancias configuradas con disableAuth, una opción compatible que inicia sesión al llamador como administrador automáticamente, exponen ambas operaciones sin autenticación.

Information

Published : 2026-08-20 21:17

Updated : 2026-10-18 20:10


NVD link : CVE-2026-73040

Mitre link : CVE-2026-73040

CVE.ORG link : CVE-2026-73040


JSON object : View

Products Affected

No product.

CWE
CWE-22

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')