Summary
Dokploy accepts a client-controlled certificate path and combines it with the certificate storage root without reliably confining the resulting path. An authenticated user with certificate create or delete permission may write certificate content outside the intended directory or remove an out-of-root directory.
Affected context
The vulnerability occurs in Dokploy certificate management when the API accepts a user-controlled certificatePath and the certificate service constructs filesystem paths without enforcing confinement beneath the intended certificate root. Exploitation depends on an authenticated account having certificate creation or deletion permissions and on the affected path-handling behavior being reachable.
Exploit preconditions
- Attack surface: Authenticated certificate management API
- Required access: An account with certificate create or delete permission
- Trigger point: Certificate creation or deletion involving the client-supplied
certificatePath - Why exploitation is possible: The supplied path is joined to the certificate root without sufficient canonicalization and root-boundary enforcement, allowing filesystem operations to target locations outside the intended directory
Why this happens
The underlying bug is an insufficiently constrained filesystem path derived from client input. Joining an attacker-controlled path to a trusted base directory does not guarantee that the final canonical path remains within that directory, particularly when traversal components or absolute-path behavior are interpreted by the filesystem API. This behavior is consistent with path traversal and improper file access control; the supplied classification is CWE-78, although the observed impact centers on filesystem path manipulation rather than command execution.
Potential impact
- An attacker may write attacker-controlled certificate content outside the intended certificate directory
- An attacker may delete directories or files reachable through the vulnerable deletion path
- Certificate stores or application configuration may be corrupted
- The application may experience denial of service or service disruption
- Sensitive files or neighboring application data could be affected, depending on process permissions
General mitigation guidance
Mitigation typically focuses on reducing trust in client-supplied paths and enforcing filesystem boundaries before any operation occurs.
Common defensive patterns include:
- Deriving storage paths from server-controlled identifiers rather than accepting arbitrary filesystem paths
- Canonicalizing candidate paths and verifying that they remain beneath the approved certificate root
- Rejecting absolute paths, traversal components, symbolic-link escapes, and ambiguous path forms
- Applying the same confinement checks to create, read, update, and delete operations
- Storing certificates with least-privilege filesystem permissions and isolating certificate directories
- Enforcing strict authorization and minimizing which users can create or delete certificates
How teams detect issues like this
Organizations commonly detect this class of issue through:
- Static analysis rules for filesystem APIs that concatenate or join paths with request-derived values
- Code review checks for missing canonicalization and root-boundary validation
- Tests covering traversal components, absolute paths, symbolic links, encoded separators, and platform-specific path forms
- Runtime monitoring for certificate-service file operations outside approved directories
- Policy enforcement requiring server-generated storage keys and centralized safe-path utilities
Automated code review and software composition analysis tools may help identify suspicious path-handling patterns, but targeted security tests are also important.

