Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
CVE-2026-57850 — RustDesk < 1.4.9 - Missing Session-Scope Enforcement Allows Out-of-Scope Control Message Injection | Kitploit
أدوات/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

عرض المستودع
1منذ 19 أياملم تتم المراجعة بعد
الموقع الإلكتروني

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة
المحتوى غير متوفر باللغة المطلوبة. عرض النسخة الإنجليزية.
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 / / ) authorization could send control messages reserved for a full session — mouse/keyboard input, screenshot requests — and the server processed them anyway.

PortForward
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
تنزيل الأداة