---
id: CVE-2026-73040
title: Dockge validates a stack name only on the write path
summary: >-
  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.serv…
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-22
vendor: louislam
product: dockge
affected:
  - dockge <= 1.5.0
published: '2026-08-20'
updated: '2026-09-23'
sourceUpdated: '2026-09-23T17:17:41.287'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-73040'
references:
  - url: 'https://github.com/louislam/dockge'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/louislam/dockge/blob/1.5.0/backend/agent-socket-handlers/docker-socket-handler.ts#L43-L78
    label: disclosure@vulncheck.com
  - url: 'https://github.com/louislam/dockge/blob/1.5.0/backend/stack.ts#L155-L157'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/louislam/dockge/blob/1.5.0/backend/stack.ts#L218-L232'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/louislam/dockge/blob/1.5.0/backend/stack.ts#L377-L379'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/louislam/dockge/issues/994'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/dockge-path-traversal-via-unvalidated-stack-name-allows-arbitrary-compose-and-env-disclosure-and-arbitrary-directory-deletion
    label: disclosure@vulncheck.com
  - url: 'https://github.com/louislam/dockge/issues/994'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
epss: 0.00821
epssPercentile: 0.55795
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-08-21T16:21:05.336646Z'
ingestedAt: '2026-09-17T18:25:15.985Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
