macOS Screen Sharing Pre-Auth SRP Bypass and Root File Read (CVE-2026-65400)
Published: 2026-11-27 • Researcher: Francisco Correa (GitHub panchocosil); original pre-auth bug by Pedro Vilaca (fG!); wire format and exploitation by bl4sty; Apple Product Security
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2026-08-18. Federal remediation deadline 2026-08-21.
EPSS 1.7% · 78th percentile
- Severity
- Critical
- CVE
- CVE-2026-65400
- Category
- network
- Affected product
- Apple macOS screensharingd (Screen Sharing / Apple Remote Management)
- Affected versions
- NVD ranges: 14.0 to before 14.8.9 (Sonoma), 15.0 to before 15.7.9 (Sequoia), 26.0 to before 26.6.1 (Tahoe). Fixed in 14.8.9, 15.7.9, 26.6.1, and also 26.7 and Golden Gate 27.
- Disclosed
- 2026-11-27
- Patch status
- Unverified
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-65400
- https://github.com/panchocosil/CVE-2026-65400-poc
- https://support.apple.com/en-us/148170
- https://support.apple.com/en-us/148171
- https://support.apple.com/en-us/149035
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-65400
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2026-08-21 |
| Author / Researcher | Francisco Correa (GitHub panchocosil); original pre-auth bug by Pedro Vilaca (fG!); wire format and exploitation by bl4sty; Apple Product Security |
| CVE / Advisory | CVE-2026-65400 |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, NVD) |
| Status | PoC (working read-only root file-read primitive; write and RCE chain not implemented) |
| Tags | apple, macos, screensharingd, screen-sharing, remote-management, auth-bypass, CWE-287, pre-auth, file-read, cisa-kev |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Apple macOS screensharingd (Screen Sharing / Apple Remote Management) |
| Versions Affected | NVD ranges: 14.0 to before 14.8.9 (Sonoma), 15.0 to before 15.7.9 (Sequoia), 26.0 to before 26.6.1 (Tahoe). Fixed in 14.8.9, 15.7.9, 26.6.1, and also 26.7 and Golden Gate 27. |
| Language / Platform | Python 3 standard library only; macOS host with Screen Sharing or Remote Management enabled; RFB over TCP 5900 |
| Authentication Required | No (pre-authentication) |
| Network Access Required | Yes (TCP 5900 reachable from the attacker) |
Summary
CVE-2026-65400 is a pre-authentication authentication bypass in macOS Screen Sharing. The screensharingd SRP authentication state machine accepts a crafted frame-length value and marks the connection authenticated before any credential has been verified. Once past that gate, the session continues in cleartext and the privileged file-copy helpers run with Full Disk Access, so the attacker can read files that only root should be able to read. The supplied PoC is deliberately read-only: it demonstrates the bypass by retrieving a root-only file such as /etc/sudoers, without writing to the target.
Vulnerability Details
Root Cause
screensharingd uses SRP for its native authentication. Its frame-length validator returns a stale success status, so a connection can be treated as authenticated before the credential exchange completes. Apple described the fix as improved state management, which matches the analysis: the cryptography was not broken, the state machine around it was. After the bypass the session proceeds in cleartext, and the SSFileCopySender and SSFileCopyReceiver helpers hold Full Disk Access, bypassing TCC for file operations.
Attack Vector
An unauthenticated attacker connects to TCP 5900 and completes the RFB version handshake. If the server offers security type 36 (SRP), the client sends a one-byte SRP selection, a crafted SRP step-1 frame with username root, and a 24488-byte blob whose declared frame length is poisoned. The oversized, malformed frame derails the daemon’s length handling so that SecurityResult is returned as zero without a password. The client then receives ServerInit and collects the file data returned by the file-copy channel, requesting a path such as /etc/sudoers. The bug is heap-racy, so the PoC retries; the daemon also throttles repeat attempts.
Impact
An unauthenticated network attacker can read arbitrary files as root from a Mac with Screen Sharing enabled, including password hashes, sudoers, keychains, configuration, and user data, bypassing TCC and normal file permissions. The upstream research notes that the same primitive supports arbitrary write and a LaunchDaemon-based RCE chain, and that the vulnerability is exploited in the wild, including for SSH key persistence and XMRig deployment. The archived PoC intentionally stops at read.
Environment / Lab Setup
OS: macOS target (author validated on macOS Tahoe 26.5.2, unpatched)
Target: macOS with System Settings > General > Sharing > Screen Sharing enabled
(or Remote Management), TCP 5900 reachable from the operator
Attacker: Any host with Python 3 and network access to the target
Tools: python3 (standard library only), no third-party packagesSetup Steps
| |
Proof of Concept
Step-by-Step Reproduction
Verify reachability — connect to the RFB service and confirm it offers SRP security type 36.
Shell script1nc -vz <target-ip> 5900Run the read-only PoC — it performs the SRP selection, sends the poisoned frame, and reads /etc/sudoers once authenticated.
Shell script1python3 poc_screensharing.py <target-ip>Choose another root-only file — any path readable by root can be requested.
Shell script1python3 poc_screensharing.py <target-ip> /etc/master.passwdIncrease retries if needed — the bug is heap-racy; the daemon throttles aggressive retries, so wait about a minute between bursts.
Shell script1python3 poc_screensharing.py <target-ip> -r 50 -t 8
Exploit Code
See poc_screensharing.py for the complete client, including the RFB handshake, SRP step-1 frame, poisoned length blob, and file-data collection.
| |
Expected Output
| |
Detection & Indicators of Compromise
authentication_type: SRP without an RSA component # legitimate sessions report RSA-SRP
session username: root # disabled by default on macOS
SSFileCopySender running with UID/GID 0 80
_LOOKUP / _OPEN / _STAT / _CLOSE operations against system paths
Repeated TCP 5900 connections that complete the RFB handshake but never authenticate normallySIEM / IDS Rule (example):
alert tcp any any -> any 5900 (msg:"Possible CVE-2026-65400 macOS Screen Sharing pre-auth SRP bypass"; \
content:"RFB 003."; depth:8; \
flow:to_server,established; sid:90654001;)Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade macOS to 14.8.9, 15.7.9, or 26.6.1 (or the later 26.7 / 27 releases). This is the only real fix. |
| Workaround | Disable Screen Sharing and Remote Management entirely if the appliance cannot be patched. |
| Config Hardening | Never expose TCP 5900 to the internet; restrict it to a management VLAN or VPN; rotating passwords or removing accounts does not help because the bypass occurs before authentication. |
References
Notes
Auto-prepared 2026-11-27 from the watchlist record. Review verdict: genuine, non-malicious reproduction research. The repository contains a runnable client that performs the actual pre-auth SRP bypass and reads a root-only file from the target; it writes nothing to the host and does not implement the write or RCE path. License: MIT (upstream-LICENSE.txt retained). Limitations: the bug is heap-racy and the daemon throttles, so it may require repeated attempts; the archived client is read-only by design; the README’s evidence screenshot (img/poc-run.png) was not copied; the author tested against a Mac they own and the research credits belong to fG! and bl4sty. No exploit code was executed during archive preparation.
| |