Summary
RustDesk before 1.4.9 fails to enforce the authorized session scope on the server, allowing restricted peers to send control messages reserved for full remote sessions.
Under these conditions, an authenticated peer with limited permissions can act outside its granted scope, potentially viewing or controlling the host beyond what was explicitly allowed.
Affected context
The vulnerability arises in RustDesk deployments where users are granted scoped session types such as FileTransfer, PortForward, ViewCamera, or Terminal instead of full Remote control.
While the client interface reflects these limited capabilities, the server does not consistently enforce them against incoming control and login messages.
As a result, any authenticated peer with a restricted session type may still be able to send and have processed messages that are intended only for fully authorized remote control sessions.
Exploit preconditions
- Attack surface: RustDesk remote access sessions over the network
- Required access: Valid authenticated session with a limited scope (e.g., FileTransfer, PortForward, ViewCamera, or Terminal)
- Trigger point: Sending control or login messages that are normally reserved for full Remote session types
- Why exploitation is possible: The server-side authorization logic trusts the session type set on the client and does not consistently re-check the permitted scope for each incoming message, allowing out-of-scope actions to be processed.
Why this happens
This issue stems from incomplete server-side authorization checks on session scopes and message types.
Instead of binding every control and login operation to a validated authorization context, the server accepts and processes messages based primarily on authentication and connection state.
This aligns with CWE-862: Missing Authorization, where a system fails to verify whether the caller is permitted to perform an operation, letting users escalate their effective capabilities beyond the scope originally granted.
Potential impact
- A restricted peer may gain remote control capabilities beyond the intended session type.
- Users with limited access could observe the host's screen or interact with input devices when they should not.
- Sensitive data on the host may be exposed through unauthorized viewing or interaction.
- Host configuration or files could be modified by peers that were meant to have only narrow, task-specific privileges.
General mitigation guidance
Mitigations typically focus on enforcing strict server-side authorization tied to session scope and message type.
Common defensive patterns include:
- Binding every incoming control and login message to a verified authorization context derived from the server's session state, not client-supplied values.
- Implementing a centralized permission model where each session type maps to an explicit set of allowed operations and message categories.
- Applying a default-deny stance for operations not explicitly granted by the session's scope.
- Separating authentication (identity) from authorization (allowed actions), ensuring that limited roles cannot perform full remote control functions even if they are otherwise trusted.
How teams detect issues like this
Detection strategies generally focus on verifying authorization flows and monitoring for scope violations.
Useful approaches include:
- Reviewing server-side code paths to confirm that every control and login-related handler enforces session scope checks.
- Adding logging for message types processed per session, and alerting when a limited session type triggers operations reserved for full Remote access.
- Using static analysis or policy-based checks to flag handlers that rely solely on authentication without consulting authorization or role data.
- Incorporating automated security tests that exercise different session types and attempt out-of-scope actions to verify that they are rejected.

