Summary
Dokploy's Docker terminal, container-log, and monitoring WebSocket handlers do not consistently verify that the requested container or app belongs to the service used for authorization. A member with read access to a service may therefore target unrelated resources, potentially exposing tenant data or enabling container and host compromise.
Affected context
The issue affects Dokploy deployments using the Docker terminal, container-log, or monitoring WebSocket handlers where authorization relies on a caller-provided serviceId. The risk arises when the requested containerId or appName is not consistently checked against that authorized service. The described affected range is from 0.29.13 up to, but not including, 0.31.0.
Exploit preconditions
- Attack surface: Docker terminal, container-log, or monitoring WebSocket handlers
- Required access: Membership with read access to at least one service
- Trigger point: A WebSocket request that specifies a service and a container or app to access
- Why exploitation is possible: Authorization for the supplied service is not consistently bound to the requested container or app, allowing requests to target unrelated resources
Why this happens
The underlying issue is an authorization check that validates a caller-controlled service identifier without consistently verifying the relationship between that service and the requested resource. This is an instance of CWE-862: Missing Authorization: access to an operation or object is not adequately checked against the caller's permissions for that specific object.
Potential impact
- An attacker may gain access to containers outside the service they are authorized to view.
- They could obtain a root shell in the Dokploy panel container.
- They may read logs or monitoring statistics belonging to other tenants.
- Access to the mounted Docker socket could enable host compromise.
General mitigation guidance
Defensive designs should authorize each requested resource directly, rather than treating access to a caller-supplied service identifier as sufficient.
- Bind container and app lookups to the authorized service context, and verify ownership on every request.
- Derive resource identifiers from trusted server-side state where practical, and treat client-supplied identifiers as untrusted.
- Apply consistent authorization checks across terminal, logs, and monitoring endpoints.
- Limit the Dokploy panel container's privileges and restrict access to the Docker socket.
- Use tenant isolation and least-privilege access as secure-by-default controls.
How teams detect issues like this
- Review WebSocket handlers for authorization checks that validate a service but fail to validate the specific container or app being accessed.
- Use static analysis or code-review rules to flag resource lookups driven by client-supplied identifiers without an ownership or access check.
- Test authorization policies with accounts that can access one service but attempt to request resources belonging to another.
- Enforce policy checks at resource boundaries and audit denied cross-service access attempts.

