/

CVE-2026-126321

Severity:

HIGH RISK

(8.3)

Path Traversal (CWE-22) in Dockhand File Browser API

CVE-2026-126321

Received

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Sensitive File Disclosure and File Manipulation

Severity:

HIGH RISK

(8.3)

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

Dockhand has a path traversal flaw in file handling that can let authenticated users with stacks:edit access files outside the intended browser directory. By combining symlinks with .. path segments, an attacker may read sensitive files or move them through the stack relocation endpoint, potentially exposing stored credentials.

Affected context

The issue affects Dockhand file operations where a path guard can be bypassed using symlinks and .. sequences. The described exposure involves /api/system/files/content and the stack relocation endpoint; exploitation requires an authenticated user with stacks:edit access.

Exploit preconditions

  • Attack surface: Dockhand file-content and stack-relocation API endpoints
  • Required access: An authenticated account with stacks:edit
  • Trigger point: A file operation that processes a path containing symlinks and .. sequences
  • Why exploitation is possible: The path guard can be bypassed, allowing file operations to reach paths outside the intended directory

Why this happens

The underlying issue is insufficient path containment enforcement, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. A guard that checks path strings without reliably accounting for symlink resolution can treat a path as confined even when its resolved destination lies outside the permitted directory.

Potential impact

  • Attackers may read /proc/self/environ, the SQLite database, or the encryption key.
  • Stored credentials may be exposed if sensitive files are accessed.
  • Sensitive files could be moved through the stack relocation functionality.
  • Disclosure of application secrets could enable further compromise, depending on deployment and credential reuse.

General mitigation guidance

Defensive approaches focus on enforcing directory boundaries after resolving paths and on limiting the effects of file operations.

  • Resolve and canonicalize paths before access, then verify that the resolved target remains within the permitted root.
  • Apply consistent containment checks to both file reads and relocation operations.
  • Restrict or reject symlinks where they are not needed, and avoid trusting user-controlled path components.
  • Limit access to file-management capabilities and run the application with only the filesystem permissions it requires.

How teams detect issues like this

  • Review file APIs for path checks performed on uncanonicalized strings or checks that do not account for symlinks.
  • Use static analysis to flag filesystem operations involving user-controlled paths without containment validation.
  • Test that path resolution and relocation remain confined to approved roots, including when symlinks are present.
  • Monitor access to sensitive files and unexpected file moves, and enforce policies that limit which identities can use file-management endpoints.

Sources

SourceLink
github.comgithub.com/Finsys/dockhand/security/advisories/GHSA-8vcv-cvj7-g5vx
vulncheck.comvulncheck.com/advisories/dockhand-before-1.0.55-path-traversal-via-symlink-in-file-browser-endpoints

Frequently asked

questions

The described attack requires an authenticated Dockhand user with stacks:edit access.

Depending on permissions and the operation used, an attacker may read sensitive files such as the environment, SQLite database, or encryption key, or move files through the stack relocation endpoint.

Resolve paths before use and verify that the final resolved path remains within the allowed directory for every file operation.

Treat path inputs as untrusted, account for symlink resolution, restrict file-management permissions, and test directory-boundary enforcement.

Find out what's already
exploitable in your codebase.