Apple's own antivirus scanner accidentally becomes a peephole into your private files
CVE-2024-40842 is a TCC (Transparency, Consent, and Control) bypass in XProtectRemediatorDubRobber, the module within Apple's built-in XProtect Remediator anti-malware framework that scans for DubRobber/XCSSET trojan infections. Because the binary holds com.apple.private.tcc.allow with kTCCServiceSystemPolicyAllFiles (Full Disk Access), a local attacker with standard user privileges can set the MAGIC environment variable to point at a crafted database file before the scanner runs. When libmagic parses the malicious database, it throws errors that embed the contents of TCC-protected *text* files — effectively side-channeling data the user or MDM explicitly denied the app from reading. Binary files (SQLite databases, binary plists, images) cannot be meaningfully exfiltrated this way. The flaw affects all macOS versions prior to Sequoia 15.0, released September 16, 2024.
Apple's MEDIUM / 5.5 rating is reasonable and, if anything, slightly generous. The CVSS vector correctly reflects local access, low privileges, no user interaction, and confidentiality-only impact. But it does not account for the *text-file-only* limitation, which materially constrains what an attacker can actually steal. Contacts, calendars, and Notes stored as plaintext are reachable, but the crown jewels on modern macOS — Keychain (binary), TCC.db (SQLite), and most user photos — are not. The vulnerability is a useful post-exploitation convenience, not a decisive capability.
4 steps from start to impact.
Gain local code execution as standard user
- Local code execution on macOS < 15.0
- Standard user account (PR:L)
- Requires initial access — attacker is already past the perimeter
- macOS Gatekeeper, notarization, and quarantine flags raise the bar for untrusted code execution
Craft malicious libmagic database
libmagic, triggers parsing errors. These errors are constructed so that the error messages include the contents of a target file. The file path of the target is embedded in the malicious database. This requires knowledge of the libmagic internal format but is straightforward for a skilled researcher.- Understanding of libmagic database format
- Knowledge of target file paths in TCC-protected locations
- No public PoC or tooling exists as of July 2026
- Target file must be a text file — binary data produces garbled, unusable output
Set MAGIC environment variable and trigger scanner
MAGIC environment variable to point to the crafted database, then triggers or waits for XProtectRemediatorDubRobber to execute. XProtect Remediator runs periodically on a system schedule. Because the binary has Full Disk Access, libmagic processes the malicious database with FDA privileges, and error output leaks the contents of TCC-protected text files.- Ability to set environment variables for the XProtectRemediatorDubRobber process
- XProtectRemediator scan cycle must execute (runs periodically)
- Launch Constraints on modern macOS may limit environment variable injection into system processes
- Timing dependency — attacker must wait for the scheduled scan or find a way to trigger it
Collect leaked file contents
libmagic to reconstruct the text content of the targeted TCC-protected file. This may include Notes data, plaintext documents, calendar entries, or contacts stored in text format. The attacker exfiltrates this data through their existing C2 channel.- Existing C2 or exfiltration channel
- Target data is in text format
- Binary files (Keychain, TCC.db, photos, SQLite) produce unusable garbled output
- Each file requires a separate crafted database — not a bulk scanner
- Data volume per leak cycle is limited
The supporting signals.
| In-the-wild exploitation | None observed. Not listed in CISA KEV. No campaign reporting from any threat intelligence vendor as of July 2026. |
|---|---|
| Proof-of-concept | No public PoC. Gergely Kalman disclosed the component and mechanism on 2026-07-11 but has not released exploit code. A collision with researcher JBO has further delayed full publication. |
| EPSS score | 0.00229 (~40th percentile) — effectively negligible exploitation probability in the next 30 days. |
| KEV status | Not listed. No CISA Binding Operational Directive deadline applies. |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N — local attack, low complexity, low privileges, confidentiality-only impact. No integrity or availability damage. |
| Affected versions | All macOS versions prior to 15.0 (Sequoia). This includes macOS Sonoma 14.x, Ventura 13.x, and earlier. Affects Mac Studio (2022+), iMac (2019+), Mac Pro (2019+), Mac mini (2018+), MacBook Air (2020+), MacBook Pro (2018+), iMac Pro (2017+). |
| Fixed version | macOS Sequoia 15.0 (released September 16, 2024). Fix sanitizes the MAGIC environment variable before XProtectRemediatorDubRobber invocation. |
| Scanning / exposure data | Not applicable — local-only vulnerability, no network-facing attack surface. Shodan/GreyNoise/Censys have no relevant exposure data. |
| Disclosure date | 2024-09-17 (Apple advisory APPLE-SA-09-16-2024-2). Researcher writeup partially published 2026-07-11. |
| Reporter | Gergely Kalman (gergelykalman.com). Prolific macOS security researcher with multiple Apple Security Bounty credits. |
noisgate verdict.
The single most decisive factor is the local-access-only attack surface combined with text-file-only data leakage, which constrains both reachability and blast radius to a single compromised host's plaintext files. While the affected component (XProtect Remediator) is a security agent present on every Mac, the vulnerability yields information disclosure only — not code execution, privilege escalation, or security-agent bypass — so the high-value-role floor does not elevate the severity.
Why this verdict
- Local-only, post-compromise prerequisite. AV:L means the attacker already has code execution on the Mac. This is a post-initial-access tool, not an entry vector. Every enterprise defender should weight this as a second-stage capability, not a perimeter risk.
- Text-file-only leakage caps the blast radius. The
libmagicerror-message side channel cannot meaningfully extract binary data. Keychain items, TCC.db, photos, and SQLite databases — the highest-value macOS targets — are immune. This materially reduces the C:H rating's real-world impact. - No PoC, no exploitation, negligible EPSS. With an EPSS of 0.00229, no public tooling, and no observed campaigns nearly two years post-disclosure, the exploitation probability is de minimis.
- Role multiplier: XProtectRemediatorDubRobber runs on *every* macOS installation (100% installed base) and holds Full Disk Access, making it a security-agent component. However, the vulnerability's outcome is host-scoped text-file information disclosure — not SYSTEM access, not security-agent bypass, not fleet compromise. On a developer workstation (low-value), the impact is minor convenience data leakage. On a managed enterprise endpoint (typical), the impact is limited exfiltration of plaintext documents and contacts — meaningful but not fleet-scale. There is no high-value server role for macOS endpoints where this chain escalates to domain/fleet/supply-chain compromise. The security-agent floor ("bypass equals SYSTEM") does not trigger because the vulnerability does not grant code execution or bypass the scanner's detection function — it abuses the scanner's FDA entitlement for reads only.
Why not higher?
Elevating to HIGH would require either remote exploitability, demonstrated in-the-wild exploitation, or a blast radius beyond a single host. None of these conditions exist. The component *is* a security agent, but the vulnerability does not disable or bypass its malware-detection function, nor does it grant privilege escalation. It is an information-disclosure side channel with significant format limitations.
Why not lower?
Dropping to LOW would undervalue the TCC bypass aspect. TCC is a meaningful security boundary on macOS, and this vulnerability lets an attacker read files the user explicitly denied access to — that is a real privacy and data-protection violation. The Full Disk Access entitlement on the exploited binary means the read scope is broad within the text-file constraint. For organizations handling regulated plaintext data on macOS endpoints, this remains a relevant risk.
What to do — in priority order.
- Upgrade to macOS 15.0 Sequoia or later — The definitive fix. Apple sanitized the MAGIC environment variable in the XProtectRemediatorDubRobber invocation path. Per the noisgate remediation SLA for MEDIUM, deploy within 365 days — but given the patch has been available since September 2024, most fleets should already be on 15.x. Audit for stragglers on Sonoma 14.x or earlier.
- Audit macOS fleet version compliance — Run an MDM query (Jamf, Kandji, Mosyle, Fleet) filtering for hosts on macOS < 15.0. Any host still on Sonoma 14.x or Ventura 13.x is exposed to this and dozens of other patched vulnerabilities. No mitigation SLA applies for MEDIUM — go straight to remediation.
- Enable EDR behavioral monitoring for env-var manipulation of system processes — Configure your macOS EDR (CrowdStrike Falcon, SentinelOne, Microsoft Defender for Endpoint) to alert on environment variable injection targeting
/Library/Apple/System/Library/CoreServices/XProtect.appand its sub-binaries. This is a low-false-positive detection. - Enforce Gatekeeper and notarization strictness — Ensure MDM profiles enforce Gatekeeper to App Store + identified developers with no user override. This raises the bar for the initial code-execution prerequisite. Does not block the vulnerability itself but reduces the attack surface for step 1.
- Network segmentation / firewall rules — This is a local-only vulnerability with no network component. Blocking ports or segmenting VLANs has zero effect on exploitability.
- XProtect signature updates — XProtect Remediator updates its malware signatures automatically, but the *vulnerability is in the scanner binary itself*, not in signature coverage. Updating signatures does not patch the environment variable handling flaw.
- TCC reset / privacy preference changes — The bypass works because the *scanner binary* holds FDA, not because the attacker's app does. Adjusting TCC permissions for user-level apps does not affect XProtectRemediatorDubRobber's entitlements.
Crowdsourced verification payload.
Run on each macOS target host as any user. No elevated privileges required. Example: bash check_cve_2024_40842.sh
#!/bin/bash
# CVE-2024-40842 check — XProtectRemediatorDubRobber TCC infoleak
# Run on macOS target host. No root required.
# Exit codes: 0 = PATCHED, 1 = VULNERABLE, 2 = UNKNOWN
MAJOR=$(sw_vers -productVersion 2>/dev/null | cut -d. -f1)
MINOR=$(sw_vers -productVersion 2>/dev/null | cut -d. -f2)
FULL=$(sw_vers -productVersion 2>/dev/null)
if [ -z "$MAJOR" ]; then
echo "UNKNOWN — unable to determine macOS version (is this macOS?)"
exit 2
fi
if [ "$MAJOR" -ge 15 ]; then
echo "PATCHED — macOS $FULL (>= 15.0 Sequoia). CVE-2024-40842 is fixed."
exit 0
else
echo "VULNERABLE — macOS $FULL (< 15.0). CVE-2024-40842 affects XProtectRemediatorDubRobber."
echo "Upgrade to macOS 15.0 (Sequoia) or later."
exit 1
fiIf you remember one thing.
Sources
- Apple Security Advisory — macOS Sequoia 15
- NVD — CVE-2024-40842
- Gergely Kalman — XProtectRemediatorDubRobber Infoleak Writeup
- Full Disclosure — APPLE-SA-09-16-2024-2
- CVEFeed — CVE-2024-40842 Detail
- Black Hat USA 2025 — XUnprotect: Reverse Engineering macOS XProtect Remediator
- CIS Advisory — Apple Products Multiple Vulnerabilities (2024-102)
What defenders are saying.
Crowdsourced verification outputs.
Results submitted by users who ran the verification payload against their environment.