Edited by humans. Written by AI. How our editing works
All articles

macOS Screen Sharing Had a Root Access Logic Bug

Two pre-auth logic bugs in macOS's screensharingd daemon handed attackers root access. Here's what went wrong and why it matters for Mac users.

Rachel "Rach" Kovacs

Written by AI. Rachel "Rach" Kovacs

August 22, 20267 min read
Share:
Shattered glass Apple logo with "HACKED" text in red, dispersing into fragments against a dark smoky background

Photo: AI. Ren Takahashi

The headline says "massive Apple hack," but the actual story is quieter and, in some ways, more unsettling than that framing suggests. No memory corruption. No exotic zero-day technique. No nation-state toolchain required. What researchers found inside macOS's screen sharing daemon was something considerably more mundane: the wrong variable got returned. That was it. That was the key.

Two pre-authentication vulnerabilities in screensharingd — the daemon that runs as root and handles macOS's built-in screen sharing — are getting attention right now, and the breakdown from the Low Level channel does a solid job explaining why these bugs deserve more than a news-cycle shrug.

What Actually Broke

screensharingd runs as root. That detail matters, because any vulnerability that lands before authentication completes — a "pre-auth" bug — gives an attacker a foothold in a process with the highest privilege level on the machine. Both bugs here are exactly that: pre-auth.

The first one is almost poetic in how simple it is. When the daemon receives a file-transfer authentication frame over Apple's proprietary message protocol, it's supposed to reject any frame larger than 32,768 bytes. Send too-large a blob, get an error, done. Except the function responsible for reading that data off the network — net_buffer_read — doesn't work the way the developer apparently assumed it did.

Standard C network functions like recv return the number of bytes read. net_buffer_read is different: it writes the byte count to an out-parameter variable and returns a status code — zero for success, something else for failure. The developer checked the size, found it too large, and returned what they thought was an error. What they actually returned was the result of net_buffer_read: zero. And zero, in this context, means success. Authenticated. Welcome in.

As Low Level puts it: "The bug here is literally we returned the wrong variable. And in doing that, we're able to bypass authentication completely. Like absolutely bonkers vulnerability."

What that authentication bypass unlocks is not subtle. Arbitrary file read as root. Arbitrary file write as root. Both primitives, over a single TCP connection. From there, an attacker can modify /etc/sudoers to elevate any user to superuser, inject commands into the ZSH environment so they execute whenever a shell spawns, or drop an SSH authorized key directly into the root directory for persistent access. Full machine compromise, pre-auth, one weird return value.

The Second Bug: State Machine Desync

The second vulnerability is less documented but follows a similar theme: logic, not memory. State machines are a coding pattern where a system moves through defined states based on inputs. If those transitions get out of sync with what the system expects, the logic designed to represent reality starts misrepresenting it instead.

The exploit sequence here is specific. An attacker sends an authentication request (auth type 36) for a user that doesn't exist. The daemon responds with a challenge — a fake one, since the user isn't real, but a response nonetheless. This apparently leaves the state machine in a holding pattern. Then the attacker sends a second request, this time with no auth type at all, for a user that does exist. The daemon sends back a challenge for that real user — and simultaneously signals that the session is authenticated.

"Something about the state machine is inherently broken," Low Level explains, "that if we send it one auth type with a fake user and then try to auth again with no auth type, that blows up the state machine and just says, 'You're in, baby.'"

Neither of these bugs is something a switch to Rust would have caught. That's worth sitting with for a moment, given how much the industry leans on memory-safe languages as a near-panacea. Rust prevents use-after-free bugs, buffer overflows, and their kin. It doesn't prevent a developer from returning the wrong variable. It doesn't prevent a state machine from being designed with incorrect transition logic. The Low Level breakdown makes this point explicitly, and it's the most important conceptual takeaway here: logic errors and implementation errors are a different category of problem than memory safety errors, and they require different mitigations.

Why Fuzzing Didn't Catch It

This is where the testing angle gets interesting. Fuzz testing — throwing massive volumes of malformed, random, or edge-case inputs at a system to provoke unexpected behavior — is a standard practice in security engineering. The question of why fuzzing didn't surface the oversized-frame bug has a plausible structural answer.

According to Google's libFuzzer documentation, tools like libFuzzer are typically configured with relatively modest input size limits, and increasing those limits comes with a cost: larger inputs mean more data to generate and process per run, which reduces the volume of test cases a fuzzer can execute in a given time window. A fuzzer that never generates inputs exceeding 32,768 bytes in that particular code path would never have triggered this bug. As Low Level observes, "if a fuzzer had just gone above this value, you would have found it."

That isn't a failing unique to Apple — it's a structural constraint of how fuzzing works at scale. Broader coverage per input trades against volume of inputs. Security teams make calibration calls, and sometimes those calls leave specific thresholds untested.

Who's Actually at Risk

Here's where threat modeling matters more than headlines. This vulnerability requires network access to the target machine. In most home configurations, your Mac is behind a NAT router; an attacker on the public internet can't reach screensharingd directly. The attack surface, in theory, is limited to local networks.

In practice, "local network" has some expansive edge cases. Shared Wi-Fi at a conference, a university network, a corporate environment where multiple users share a subnet — these all collapse the distance between attacker and target. Low Level raises the Defcon scenario specifically: thousands of security professionals on a shared network, and two pre-auth root exploits sitting in a macOS daemon that many of them are running. The irony writes itself.

The more operationally significant risk, though, is the one that prompted the original research: this vulnerability is being actively exploited to deploy Monero cryptocurrency miners. That active exploitation implies some meaningful population of machines have their screen sharing service directly reachable from the internet. Misconfigured servers, exposed VNC ports, remote access setups that prioritized convenience over network hygiene — whatever the reason, attackers found them and put them to work.

Monero mining is the attacker's choice here partly because Monero is CPU-mineable and privacy-focused, and partly because it's low-drama monetization. No ransomware negotiation, no data exfiltration to fence, no loud indicators of compromise. Just quiet cycles burned on your hardware for someone else's benefit.

What This Looks Like From the Outside

There's a tendency in security coverage to treat "no memory corruption" as a qualifier that diminishes a vulnerability. That instinct is wrong here. A pre-auth root authentication bypass is a pre-auth root authentication bypass regardless of whether it involves a heap overflow or a misread return value. The impact is the same. The exploitability — arguably — is higher for logic bugs, because they don't require the finesse of memory corruption techniques and they're less likely to be caught by the sanitizers and mitigations that target memory bugs specifically.

The two bugs in screensharingd are a useful reminder that the security conversation has a tendency to fixate on technique — memory safety, language choice, exploit mitigations — while logic errors sit quietly in authentication flows, doing exactly what the code tells them to do, even when what the code tells them to do is wrong.

If your Mac has screen sharing enabled and you're not certain it's isolated behind a firewall or VPN, the appropriate response is straightforward: disable screen sharing, or ensure it's accessible only through an SSH tunnel. The vulnerability is patched in current macOS versions, so if you're current on updates, you're current on this. If you're not — now's a reasonable time to reconsider that.

The more durable question is what this category of bug says about how authentication systems get reviewed before they ship. Fuzz testing catches a lot. Code review catches more. But logic errors in state machines and return-value assumptions occupy a space that neither technique reliably covers. That gap isn't new, and it's not unique to Apple. It just showed up here, clearly enough to see.


Rachel "Rach" Kovacs covers cybersecurity and privacy for Buzzrag.

More Like This

Two hosts with microphones discuss Apple's Siri improvements while a hand holds an iPhone displaying its home screen…

New Siri Indexes Your Private Data. Now What?

Apple rebuilt Siri's on-device index from scratch. It's genuinely better. It also reads your messages, mail, and photos. Here's what that actually means for you.

Rachel "Rach" Kovacs·2 months ago·7 min read
WordPress logo with "HACKED" text on dark tech-themed background indicating security breach topic

WordPress RCE Vulnerabilities Put Millions of Sites at Risk

Two chained WordPress vulnerabilities enable unauthenticated remote code execution. Here's how the exploit works and why patching immediately is not optional.

Dev Kapoor·4 weeks ago·7 min read
Developer in glasses reacting with hands on face while reviewing code for an RCE exploit module on screen

Unpacking 2026's First Major Security Bug

Explore the critical HPE1 view bug, a 10.0 CVSS vulnerability disrupting corporate management.

Tyler Nakamura·8 months ago·4 min read
Man in glasses holding a black Tenda router with four antennas, with red text reading "THIS IS F**KED" above it

Tenda Routers Have Backdoors. Here's How They Work

A security researcher bought a popular Tenda router from Amazon and found multiple backdoors. Here's what that means for the millions of people running one.

Rachel "Rach" Kovacs·3 weeks ago·8 min read
White network node diagram on purple digital background with "N8N Security Vulnerabilities" text and gem logo

Urgent Patch Required for Critical n8n Vulnerabilities

Critical n8n vulnerabilities found. Urgent patch needed to protect against attacks. Follow best practices for security.

Mike Sullivan·8 months ago·3 min read
Think podcast featuring five experts discussing AI and 2026 graduates in a grid video layout

AI Is Corrupting Your Documents—And Gen Z Knows It

New Microsoft research finds top AI models corrupt 25% of document content in long workflows. Meanwhile, Gen Z's AI skepticism might be the healthiest response in the room.

Rachel "Rach" Kovacs·3 months ago·7 min read
A man with glasses gestures expressively against a dark background with "GOOGLE ENDGAME" text and colorful Google logo…

Google I/O 2026: The Agentic Gemini Era Explained

Google wants persistent AI access to your Gmail, search, Android, and glasses. Here's what 'agentic Gemini' actually means for your digital privacy.

Rachel "Rach" Kovacs·3 months ago·8 min read

RAG·vector embedding

2026-08-22
1,821 tokens1536-dimmodel text-embedding-3-small

This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.