/

CVE-2026-30793

Severity:

CRITICAL RISK

(9.8)

CSRF in RustDesk Client URI Scheme Handling

CVE-2026-30793

Analyzed

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-285, CWE-352

Impact:

Privilege Escalation via Forced State-Changing Actions

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A Cross-Site Request Forgery (CSRF) issue in the RustDesk Client's custom URI scheme handler (rustdesk://) allows untrusted web content to trigger privileged actions without user consent.

By abusing the rustdesk://password/ handler and related FFI bridge routines, an attacker could set or change a permanent password and thereby escalate privileges on systems running RustDesk Client up to version 1.4.5.

Affected context

The vulnerability occurs in RustDesk Client deployments that:

  • Register and handle the custom URI scheme rustdesk:// on Windows, macOS, Linux, iOS, or Android
  • Process rustdesk://password/ URIs in the Flutter layer (flutter/lib/common.dart) and FFI modules (src/flutter_ffi.rs)
  • Allow the URI handler to perform state-changing operations such as bind.MainSetPermanentPassword() without robust origin validation or user confirmation

It becomes risky when a user has RustDesk Client installed and configured, and then visits a malicious or compromised website or application capable of launching rustdesk:// URIs on the same device.

Exploit preconditions

  • Attack surface: Local application invoked through system-level URI scheme handling from a browser, email client, chat app, or other application capable of opening external links.
  • Required access: The attacker needs to convince a victim to open a crafted URL (e.g., clicking a link, viewing a page that auto-invokes the URI scheme, or interacting with content that triggers the handler).
  • Trigger point: A rustdesk://password/ or similarly structured URI is processed by the RustDesk Client's Flutter URI handler and passed through the FFI bridge to bind.MainSetPermanentPassword().
  • Why exploitation is possible: The URI scheme handler treats inbound requests as sufficiently trusted, does not enforce strong CSRF-like protections (such as explicit user confirmation or trusted-origin checks), and directly performs privileged configuration changes when the link is opened.

Why this happens

The core issue is a combination of:

  • CWE-352: Cross-Site Request Forgery (CSRF): The RustDesk Client's custom URI handler allows external contexts (like web pages) to trigger sensitive, state-changing operations as a side effect of opening a specially crafted link, without requiring an in-app user action or robust consent.
  • CWE-285: Improper Authorization: The privileged routine bind.MainSetPermanentPassword() is exposed through the URI handling and FFI bridge without adequate authorization checks or a trustworthy indication that the request originated from an authenticated, local, or explicitly consenting user.

Conceptually, the design treats a "link open" event as equivalent to a trusted, interactive request from the user. This violates common security expectations that custom URL handlers and deep links must validate intent, enforce authorization, or require explicit confirmation before applying sensitive configuration changes.

Potential impact

  • An attacker may set or overwrite the permanent password used by RustDesk Client without the user's knowledge.
  • The attacker could gain remote access to the user's system by leveraging the attacker-controlled permanent password.
  • Existing access controls and trust relationships within RustDesk sessions can be weakened or bypassed.
  • Compromise of endpoint confidentiality and integrity through unauthorized remote control or screen access.
  • Potential pivoting into wider network environments if the compromised host has broader access.

General mitigation guidance

Effective mitigation focuses on treating custom URI handlers as untrusted entry points and hardening privileged operations exposed through them:

  • Require explicit, in-app user confirmation (e.g., dialog or secondary action) before applying any configuration or password changes initiated via rustdesk:// URIs.
  • Implement strict authorization and intent checks around sensitive routines such as MainSetPermanentPassword(), ensuring they are only callable from authenticated, trusted UI flows rather than direct URI invocations.
  • Introduce CSRF-style defenses into the deep link handling path, such as single-use tokens, user presence checks, or binding actions to an active, foreground session.
  • Narrow the scope of the URI scheme: avoid exposing direct "set password" or similar high-privilege operations, and instead route through safer, higher-level flows that inherently enforce user interaction.
  • Apply the principle of least privilege within FFI bridge modules so that only necessary functionality is accessible from external triggers, and sensitive APIs are gated behind explicit checks.

How teams detect issues like this

To detect and prevent similar vulnerabilities, organizations and developers can:

  • Perform code reviews focused on custom URI/deep link handlers (rustdesk://*), tracing which internal functions can be invoked and whether they require user interaction or authorization.
  • Use static analysis or manual inspection to flag:
  • Direct calls from URI handlers into state-changing routines (e.g., password setters, configuration writers) without intermediate validation.
  • FFI bridge functions that expose security-sensitive capabilities to external triggers without explicit security checks.
  • Define secure coding policies for deep links and external protocol handlers, such as "no direct privileged actions from URI handlers" and "all password or credential changes must originate from authenticated UI flows."
  • Apply dynamic testing by crafting benign test URIs and verifying that they cannot change security-critical settings without user confirmation.

Sources

SourceLink
docs.google.comdocs.google.com/document/d/e/2PACX-1vSds6jjpd38oO_yIAyd1HYtKNUuea-I-ozAPpGhYI7QgAU-QGJ7D8a4rOZVj1vmiUXV1EcdRHf9aZAW/pub
github.comgithub.com/rustdesk/hbb_common
github.comgithub.com/rustdesk/rustdesk
vulsec.orgvulsec.org/

Frequently asked

questions

Yes, indirectly. An attacker can host or send a malicious link that, when opened on a device with RustDesk Client installed, triggers the vulnerable URI handler locally. The attack originates from external content but executes on the victim's machine.

The attacker does not need prior access to the victim's RustDesk installation. They only need to convince the victim to open a crafted rustdesk:// link (for example, through a web page, email, chat message, or document) on a device where RustDesk Client is installed and the URI scheme is registered.

The safest pattern is to ensure that custom URI handlers and deep links never perform privileged actions directly. Instead, they should open a secure, authenticated UI flow where the user must explicitly confirm or initiate any sensitive operation, such as changing passwords or enabling remote access.

When designing URI schemes, deep links, or FFI bridges, treat all external inputs as untrusted. Restrict exposed operations to low-risk actions, wrap sensitive functionality behind strong authorization and explicit user interaction, and regularly review deep-link entry points during security assessments and code reviews.

Find out what's already
exploitable in your codebase.