Summary
Dokploy contains a missing authorization check in its WebSocket terminal handler. An authenticated user may obtain an interactive terminal on the Dokploy host by requesting the local server endpoint, even without the organization role or server access normally required.
Affected context
The issue occurs in Dokploy deployments that expose the WebSocket terminal functionality and use an affected handler for local server requests. Session authentication is performed, but authorization is not consistently checked against the requested server, allowing the special local-server path to bypass expected organization and server-access controls.
Exploit preconditions
- Attack surface: WebSocket terminal endpoint
- Required access: A valid authenticated Dokploy user session
- Trigger point: A terminal connection request targeting the local server identifier
- Why exploitation is possible: The handler validates that the session exists but does not verify whether the user is authorized to access the requested server
Why this happens
The underlying flaw is an authorization decision that stops after authentication and does not enforce resource-level access control. The WebSocket handler accepts a special local-server branch without applying the organization-role and server-access checks expected for terminal sessions. This behavior maps to CWE-862: Missing Authorization, where an application fails to verify whether an authenticated subject is permitted to perform an operation on a specific resource.
Potential impact
- An authenticated user could obtain an interactive terminal on the Dokploy host
- The attacker may access or modify files available to the service account
- The attacker could alter deployments, credentials, or application configuration
- The compromise could enable lateral movement or broader host impact depending on runtime privileges
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every terminal connection path, including special-case local-server branches.
Common defensive patterns include:
- Applying centralized, resource-aware authorization before establishing a terminal session
- Requiring explicit organization roles and server permissions for the requested target
- Avoiding implicit trust in special identifiers such as local server references
- Using least-privilege service accounts and restricting terminal process capabilities
- Logging and reviewing terminal connection attempts, authorization decisions, and session creation
- Treating authentication and authorization as separate mandatory controls
How teams detect issues like this
Organizations can detect similar issues through:
- Static analysis and code review checks for authenticated endpoints that lack resource authorization
- Reviewing WebSocket handlers for special-case branches that bypass common access-control middleware
- Testing each server identifier and terminal route with users holding different organization roles
- Monitoring for terminal sessions created by users without corresponding server permissions
- Enforcing policy checks requiring authorization before WebSocket upgrades or interactive session creation
Automated security review tools may help identify inconsistent authorization paths, but endpoint-level authorization tests remain important.

