Summary
A critical authorization flaw in Dokploy's schedule management allows a member with access to an application to associate that application with a server-level schedule. If the schedule is then manually run, the supplied script may execute with root privileges on the Dokploy host.
Affected context
The issue occurs in Dokploy schedule creation and update operations when application or Compose identifiers are used to derive the associated service. In affected deployments, authorization checks for host-level scheduling may not consistently apply to schedules linked through an application. Risk depends on a member having application access and the ability to create or modify schedules that can be manually executed.
Exploit preconditions
- Attack surface: Dokploy schedule creation and update APIs
- Required access: Authenticated member access to at least one application
- Trigger point: Manual execution of a schedule through
schedule.runManually - Required condition: The schedule must reference an application identifier that the member can access
- Why exploitation is possible: The authorization path may validate application access without consistently enforcing the owner or administrator requirement for host-level scheduling
Why this happens
The underlying bug is an authorization decision that depends on how the service identifier is derived. When an application identifier or Compose identifier is supplied, the service association can bypass the owner or administrator check applied in an alternative branch. This maps primarily to CWE-863, Incorrect Authorization, because a valid application-level permission is treated as sufficient for a more privileged scheduling operation. The resulting execution context also reflects CWE-269, Improper Privilege Management, because the scheduled script can run with root-level privileges.
Potential impact
- An attacker may execute arbitrary scripts with root privileges on the Dokploy host.
- The attacker could compromise hosted applications and deployment credentials.
- Sensitive data, secrets, or service configuration may be exposed.
- The attacker could alter deployments, disrupt workloads, or tamper with hosted code.
- A compromised host could enable lateral movement into connected infrastructure.
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the point where the
privileged action is performed, rather than relying on indirect service
ownership checks.
Common defensive patterns include:
- Apply the same owner or administrator authorization requirement across every identifier-resolution branch.
- Authorize schedule creation, modification, and execution as separate privileged operations.
- Treat application membership as insufficient for host-level scheduling unless explicitly permitted by policy.
- Use secure-by-default scheduling policies that disable root execution and require narrowly scoped service identities.
- Reduce input trust by resolving identifiers server-side and validating that the requested resource and operation are within the caller's effective scope.
- Run scheduled scripts with the least privilege necessary and isolate them from host-level resources.
- Record and review schedule changes, manual executions, and authorization decisions.
How teams detect issues like this
Detection and review approaches may include:
- Static analysis for authorization checks that appear only in conditional branches or alternate identifier paths.
- Code review of every API that accepts application, Compose, service, or schedule identifiers.
- Tests confirming that members cannot create, modify, or manually execute host-level schedules outside their assigned scope.
- Negative authorization tests for mixed-resource references and identifier substitution.
- Policy enforcement requiring explicit privilege checks before operations that can execute scripts or access the host.
- Audit monitoring for unusual schedule creation, changes to script content, and manual execution by non-administrative accounts.
Automated security review tools can help identify inconsistent authorization and privilege-boundary checks.

