/

CVE-2026-73040

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Dockge Stack Manager Backend

CVE-2026-73040

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Sensitive Information Disclosure and Arbitrary Directory Deletion

Severity:

HIGH RISK

(8.8)

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

Dockge contains a path traversal vulnerability because stack names are validated when saved but not when existing stacks are read or deleted. An authenticated user may use a crafted stack reference to access Compose or environment-file contents outside the managed stacks directory, and may delete eligible directories that contain a valid Compose file.

Affected context

The issue can affect Dockge deployments where stack-related socket handlers accept user-controlled names and resolve them into filesystem paths without applying the same allow-list validation used during writes. Risk is greater when the Dockge process has broad filesystem permissions, runs with elevated privileges, or operates with authentication disabled through an administrative auto-login configuration.

Exploit preconditions

  • Attack surface: Authenticated stack-management socket operations
  • Required access: A logged-in Dockge account, unless authentication is disabled through a supported configuration option
  • Trigger point: Stack lookup, Compose metadata retrieval, or stack deletion
  • Why exploitation is possible: Read and delete paths construct filesystem locations from stack names without enforcing the write-path name restrictions
  • Deletion condition: The resolved target must contain a valid Compose file for the Docker Compose shutdown operation to complete successfully

Why this happens

The vulnerability results from inconsistent input validation across object lifecycle operations. Dockge applies an allow-list to stack names during saving, but path getters and stack lookup routines use the supplied name directly when constructing filesystem paths. This permits path components to escape the intended stacks directory and maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Sensitive values from accessible .env files or accepted Compose files could be disclosed
  • Unrelated application configuration and deployment secrets may be exposed
  • Eligible directories could be deleted recursively
  • Services associated with deleted Compose projects could be disrupted
  • A privileged Dockge process could expose or remove a wider set of host files
  • Access to the Docker socket could increase the consequences of host or container compromise

General mitigation guidance

Mitigation generally focuses on enforcing one canonical, trust-minimized validation policy for every stack operation.

Common defensive patterns include:

  • Validate stack identifiers before every read, update, and delete operation
  • Resolve candidate paths canonically and require them to remain beneath the configured stacks directory
  • Prefer server-side stack identifiers or opaque references over filesystem-derived names
  • Separate metadata retrieval from destructive filesystem operations
  • Require explicit authorization and confirmation for deletion
  • Run Dockge with least-privilege filesystem access and avoid unnecessary root permissions
  • Restrict Docker socket exposure and use a narrowly privileged container or proxy where practical
  • Keep authentication enabled and apply role-based authorization to stack management

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules that identify filesystem path construction from socket, HTTP, or RPC parameters
  • Code review checks comparing validation coverage across create, read, update, and delete paths
  • Tests using canonical-path assertions to verify that resolved locations remain within an approved directory
  • Runtime monitoring for access to .env, Compose files, or directories outside the configured stacks root
  • Audit rules for recursive deletion and Docker Compose operations initiated by unusual accounts
  • Policy enforcement requiring authentication, least privilege, and restricted Docker socket access

Automated code review and security scanning tools may help identify inconsistent validation and unsafe path-joining patterns.

Sources

SourceLink
github.comgithub.com/louislam/dockge
github.comgithub.com/louislam/dockge/blob/1.5.0/backend/agent-socket-handlers/docker-socket-handler.ts#L43-L78
github.comgithub.com/louislam/dockge/blob/1.5.0/backend/stack.ts#L155-L157
github.comgithub.com/louislam/dockge/blob/1.5.0/backend/stack.ts#L218-L232
github.comgithub.com/louislam/dockge/blob/1.5.0/backend/stack.ts#L377-L379
github.comgithub.com/louislam/dockge/issues/994
vulncheck.comvulncheck.com/advisories/dockge-path-traversal-via-unvalidated-stack-name-allows-arbitrary-compose-and-env-disclosure-and-arbitrary-directory-deletion

Frequently asked

questions

It may be exploitable through Dockge's network-accessible management interface when an attacker has a valid authenticated session. Deployments with authentication disabled may expose the operations without a user login.

The key requirement is access to the stack-management operations. The practical impact also depends on the Dockge process having permission to read or remove the targeted paths.

Apply consistent validation to every stack name before path construction, canonicalize the resulting path, and verify that it remains within the approved stacks directory before performing reads or deletion.

Use centralized path-boundary helpers, test all filesystem operations with traversal cases, enforce least privilege, keep authentication enabled, and monitor sensitive file access and recursive deletion.

Find out what's already
exploitable in your codebase.