Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/sn0x-sharma/cve-2026-57850
Vulnerability AnalysisExploitationWeb Application ExploitationNetwork SecurityPenetration TestingRemote Access Tool
GitHubsn0x-sharma/cve-2026-57850

CVE-2026-57850

RustDesk < 1.4.9 - Missing Session-Scope Enforcement Allows Out-of-Scope Control Message Injection

查看仓库
119天前尚未审核
网站

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
内容在请求的语言中不可用。显示英文版本。
ChatGPT Image Aug 11, 2026, 02_50_06 PM

Summary

RustDesk sessions are authorized for a specific connection type — Remote (full desktop control), FileTransfer, PortForward, ViewCamera, or Terminal. Before 1.4.9, the server's post-authorization message gate only checked one boolean, self.authorized, and never re-checked it against the connection's actual AuthConnType. A peer that only holds FileTransfer (or PortForward / / ) authorization could send control messages reserved for a full session — mouse/keyboard input, screenshot requests — and the server processed them anyway.

ViewCamera
Terminal
Remote

Root Cause

src/server/connection.rs the authorized-message gate before the fix reduced to:

root@kitploit:~
if self.authorized {
    // any message type is processed here — no check against AuthConnType
}

No function compared the incoming message's type against what the session was actually authorized for.

The Fix (PR #15469)

Added a per-AuthConnType whitelist, checked on every authorized message:

root@kitploit:~
let allowed = match conn_type {
    AuthConnType::Remote       => true,
    AuthConnType::FileTransfer => Self::is_file_transfer_scoped_message(msg),
    AuthConnType::PortForward  => false,
    AuthConnType::ViewCamera   => Self::is_view_camera_scoped_message(msg),
    AuthConnType::Terminal     => Self::is_terminal_scoped_message(msg),
};

Gate as merged:

root@kitploit:~
if self.authorized {
    if matches!(msg.union.as_ref(), Some(message::Union::LoginRequest(_))) {
        return true;
    }
    if let Some(message) = self.authorized_scope_violation(&msg) {
        return self.handle_authorized_scope_violation(message).await;
    }
}

Anything outside scope now raises a SessionScopeViolation alarm and the connection is closed instead of processed.

AuthConnTypeAllowed after the fix
RemoteEverything (unchanged — this is the full-control session type)
FileTransferFileAction / FileResponse message families only
PortForwardNothing beyond housekeeping — always denied
ViewCameraCamera/viewing messages, including ScreenshotRequest
TerminalTerminalAction message family only

Files changed: src/server/connection.rs (the gate + scope functions + unit tests), src/client/io_loop.rs and src/ui_session_interface.rs (client-side view-camera guards), flutter/lib/common/widgets/toolbar.dart (hides the "Take screenshot" control outside default desktop sessions), libs/hbb_common (submodule bump).

Attack Flow

root@kitploit:~
1. Attacker obtains (or is granted) authorization for a limited connection
   type only — e.g. AuthConnType::FileTransfer
2. self.authorized flips to true; pre-1.4.9, the server never re-checks
   which AuthConnType that authorization actually covers
3. Attacker sends MouseEvent / KeyEvent / ScreenshotRequest on the same
   connection — message types reserved for AuthConnType::Remote
4. Vulnerable server: processes them anyway (drives input, returns screen
   content) — attacker acts outside the scope they were actually granted
5. Patched server (>= 1.4.9): rejects each message, raises a
   SessionScopeViolation alarm, disconnects

Proof of Concept

CVE-2026-57850_POC.py — single file, no live target or network access needed.

It reimplements both the vulnerable gate (self.authorized only) and the fixed gate (the AuthConnType whitelist above, translated 1:1 from the PR) and replays the same message sequence — LoginRequest(FileTransfer) → MouseEvent → KeyEvent → ScreenshotRequest — through each, so you can see exactly which messages a pre-1.4.9 server would have processed that a patched one now blocks.

root@kitploit:~
# Run the simulation (default: attacker holds FileTransfer-only auth)
python3 CVE-2026-57850_POC.py

# Simulate from a different limited scope
python3 CVE-2026-57850_POC.py --conn-type ViewCamera

# Optional: sanity-check that a local checkout matches the described
# vulnerable/patched code shape (looks for AuthConnType, SessionScopeViolation,
# authorized_scope_violation, is_view_camera_scoped_message in
# src/server/connection.rs)
python3 CVE-2026-57850_POC.py --repo-root /path/to/rustdesk

Impact

  • Screen capture and input injection beyond the granted session scope (Confidentiality + Integrity impact per CVSS)
  • A victim who only approved e.g. a file-transfer request unknowingly exposes full mouse/keyboard/screenshot control
  • Does not bypass RustDesk's own authentication a valid authorization for some connection type is still required

References

  • CVE-2026-57850 record (CNA: VulnCheck)
  • Fix PR #15469
  • RustDesk 1.4.9 release
下载工具