/

CVE-2026-57169

Severity:

CRITICAL RISK

(9.6)

Missing Authentication (CWE-306) in Dockhand Terminal

CVE-2026-57169

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306, CWE-862

Impact:

Unauthenticated Command Execution

Severity:

CRITICAL RISK

(9.6)

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's container terminal WebSocket endpoint does not enforce authentication during the WebSocket upgrade, allowing an unauthenticated attacker with network access to open a terminal session in an eligible container. If the attacker knows the container ID and the container provides an interactive shell, they may execute commands inside it, with greater consequences when sensitive mounts or privileged settings are present.

Dockhand's container terminal WebSocket endpoint does not enforce authentication during the WebSocket upgrade, allowing an unauthenticated attacker with network access to open a terminal session in an eligible container. If the attacker knows the container ID and the container provides an interactive shell, they may execute commands inside it, with greater consequences when sensitive mounts or privileged settings are present.

Affected context

The issue occurs in Dockhand deployments where the in-browser terminal endpoint handles WebSocket upgrades without verifying the requester's identity and authorization. Risk is greatest when the service is network-reachable, a container identifier can be obtained or guessed, and the target container exposes an interactive shell through the terminal functionality.

The issue occurs in Dockhand deployments where the in-browser terminal endpoint handles WebSocket upgrades without verifying the requester's identity and authorization. Risk is greatest when the service is network-reachable, a container identifier can be obtained or guessed, and the target container exposes an interactive shell through the terminal functionality.

Exploit preconditions

  • Attack surface: The Dockhand container terminal WebSocket endpoint at /api/containers/<id>/exec
  • Required access: Network reachability to Dockhand, without necessarily having an authenticated application session
  • Required target knowledge: A valid target container ID
  • Trigger point: The WebSocket upgrade request for an interactive container terminal
  • Why exploitation is possible: Authentication and authorization are not enforced before the terminal session is established
  • Attack surface: The Dockhand container terminal WebSocket endpoint at /api/containers/<id>/exec
  • Required access: Network reachability to Dockhand, without necessarily having an authenticated application session
  • Required target knowledge: A valid target container ID
  • Trigger point: The WebSocket upgrade request for an interactive container terminal
  • Why exploitation is possible: Authentication and authorization are not enforced before the terminal session is established

Why this happens

The vulnerability results from treating a WebSocket upgrade as a trusted internal request instead of applying the same authentication and authorization controls used by the surrounding application. Because the terminal endpoint accepts the upgrade without validating the caller's identity and permission to access the selected container, an unauthenticated party can reach a command-execution capability. This maps primarily to CWE-306: Missing Authentication for Critical Function, with CWE-862: Missing Authorization also applying because access to a specific container operation is not properly restricted.

The vulnerability results from treating a WebSocket upgrade as a trusted internal request instead of applying the same authentication and authorization controls used by the surrounding application. Because the terminal endpoint accepts the upgrade without validating the caller's identity and permission to access the selected container, an unauthenticated party can reach a command-execution capability. This maps primarily to CWE-306: Missing Authentication for Critical Function, with CWE-862: Missing Authorization also applying because access to a specific container operation is not properly restricted.

Potential impact

  • Unauthenticated attackers may execute commands inside an eligible container
  • Application data, secrets, or mounted files could be accessed or altered
  • Container workloads may be disrupted or modified
  • Host compromise could occur when containers expose sensitive host mounts or privileged execution
  • Attackers could use the container as a foothold for lateral movement
  • Unauthenticated attackers may execute commands inside an eligible container
  • Application data, secrets, or mounted files could be accessed or altered
  • Container workloads may be disrupted or modified
  • Host compromise could occur when containers expose sensitive host mounts or privileged execution
  • Attackers could use the container as a foothold for lateral movement

General mitigation guidance

Mitigation should center on enforcing identity and permission checks before any terminal WebSocket session is accepted.

Defensive patterns include:

  • Require authenticated sessions for the WebSocket handshake
  • Authorize the requested container and terminal operation for the identified user or service identity
  • Apply the same access-control policy to WebSocket routes as to ordinary HTTP routes
  • Use short-lived, scoped terminal capabilities rather than broadly trusted endpoint access
  • Restrict network exposure of management interfaces through segmentation and administrative access controls
  • Run containers with least privilege, minimal mounts, and no unnecessary host access
  • Log, monitor, and rate-limit terminal session creation and command-execution activity

Mitigation should center on enforcing identity and permission checks before any terminal WebSocket session is accepted.

Defensive patterns include:

  • Require authenticated sessions for the WebSocket handshake
  • Authorize the requested container and terminal operation for the identified user or service identity
  • Apply the same access-control policy to WebSocket routes as to ordinary HTTP routes
  • Use short-lived, scoped terminal capabilities rather than broadly trusted endpoint access
  • Restrict network exposure of management interfaces through segmentation and administrative access controls
  • Run containers with least privilege, minimal mounts, and no unnecessary host access
  • Log, monitor, and rate-limit terminal session creation and command-execution activity

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and route reviews that identify WebSocket handlers lacking authentication middleware
  • Code review checks confirming authentication and object-level authorization occur before session upgrades
  • Dynamic tests that attempt unauthenticated WebSocket connections to administrative and terminal endpoints
  • Policy enforcement requiring centralized identity validation for every management-plane route
  • Monitoring for terminal sessions that lack a corresponding authenticated principal or authorization decision
  • Automated security testing and code review tools configured to flag missing authentication and authorization controls

Organizations can look for this class of issue through:

  • Static analysis and route reviews that identify WebSocket handlers lacking authentication middleware
  • Code review checks confirming authentication and object-level authorization occur before session upgrades
  • Dynamic tests that attempt unauthenticated WebSocket connections to administrative and terminal endpoints
  • Policy enforcement requiring centralized identity validation for every management-plane route
  • Monitoring for terminal sessions that lack a corresponding authenticated principal or authorization decision
  • Automated security testing and code review tools configured to flag missing authentication and authorization controls

Sources

SourceLink
github.comgithub.com/Finsys/dockhand/commit/efb634701c55f80a8c752df8ae08d88f2c16cce9
github.comgithub.com/Finsys/dockhand/releases/tag/v1.0.34
github.comgithub.com/Finsys/dockhand/security/advisories/GHSA-f6q3-chhc-4hxm

Frequently asked

questions

Yes. An attacker generally needs network reachability to the Dockhand service, but does not need a valid application login when the vulnerable WebSocket upgrade is exposed.

The attacker must identify a valid container ID and target a container that supports an interactive shell through the terminal endpoint.

Require authentication and perform explicit, object-level authorization before accepting the WebSocket upgrade or starting the terminal process.

Apply centralized access-control middleware to HTTP and WebSocket routes, test unauthenticated and cross-container access cases, minimize container privileges, and monitor management-plane activity.

Yes. An attacker generally needs network reachability to the Dockhand service, but does not need a valid application login when the vulnerable WebSocket upgrade is exposed.

The attacker must identify a valid container ID and target a container that supports an interactive shell through the terminal endpoint.

Require authentication and perform explicit, object-level authorization before accepting the WebSocket upgrade or starting the terminal process.

Apply centralized access-control middleware to HTTP and WebSocket routes, test unauthenticated and cross-container access cases, minimize container privileges, and monitor management-plane activity.

Find out what's already
exploitable in your codebase.