Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-112487 — Proof-of-concept local privilege escalation exploit for macOS revisiond (CVE-2026-112487) that overwrites /etc/sudoers via XPC, copyfile hardlink and ACL flaws to gain root. | Kitploit
Tools/GitHubGitHub/lyutoon/cve-2026-112487
Privilege EscalationVulnerability AnalysisExploitationBinary Exploitation
GitHublyutoon/cve-2026-112487

CVE-2026-112487

Proof-of-concept local privilege escalation exploit for macOS revisiond (CVE-2026-112487) that overwrites /etc/sudoers via XPC, copyfile hardlink and ACL flaws to gain root.

View Repository
18521 days agoNot yet reviewed
Share

CVE-2026-112487 — macOS revisiond Local Privilege Escalation

Storage Available for: macOS Golden Gate Impact: An app may be able to gain root privileges Description: A path handling issue was addressed with improved validation.

CVE-2026-112487: YingQi Shi (@Mas0nShi) of DBAppSecurity's WeBin lab, Junyeong Lee (jylab.github.io), Andreas Jaegersberger & Ro Achterberg of Nosebeard Labs, Jaeyeong Lee, Gergely Kalman (@gergely_kalman), Lyutoon

A local privilege escalation in revisiond (com.apple.revisiond), the root LaunchDaemon behind macOS Document Revisions (Versions). Its XPC listener is completely ungated — listener:shouldAcceptNewConnection: returns 1 unconditionally, with no entitlement check, no audit-token validation, and no sandbox restriction. Any local user, including a non-admin standard user, can connect and drive it. Combined with three path-handling flaws in its document-staging flow, this yields an overwrite of /etc/sudoers and a passwordless root shell — no root assistance, no user interaction, under a second.

Verified on macOS 26.6 (25G72), arm64, SIP ON. Fixed in macOS Golden Gate.

Demo

Full non-admin-user → root run on macOS 26.6 (25G72): demo.mov

Root Cause

Four issues chain together in revisiond's document-staging flow:

  1. Ungated XPC listener. -[GSListener listener:shouldAcceptNewConnection:] (@ 0x1000130dc) accepts every connection — no entitlement, audit-token, or sandbox check.

  2. copyfile follows a hardlinked destination. The createAdditionInStorage:stagedFileDescriptor:creationInfo:completionHandler: handler calls copyfile(src, "{src}_XXXXXX", 0x800F). The _XXXXXX suffix is literal (no mkstemp), so the destination is predictable, and the flags (COPYFILE_ALL | 0x8000) contain neither COPYFILE_EXCL nor COPYFILE_NOFOLLOW_DST. A hardlink pre-planted at the destination is a regular file — copyfile writes the source content straight into the hardlink's shared inode. O_NOFOLLOW and O_EXCL only stop symlinks, not hardlinks.

  3. COPYFILE_STAT re-chowns the destination to the source's owner. With a root-owned source, the overwritten destination inode is fchowned back to uid 0 — so /etc/sudoers stays root:wheel with a sudo-acceptable mode after being overwritten with attacker content.

  4. ACL file_inherit provides a root-owned attacker-controlled source. revisiond chowns the per-client staging directory to the caller's uid, then clonefiles the staged file into it. A caller who has set a file_inherit ACL on the staging dir gets that ACL propagated onto the root-owned clone — write access to a root-owned file, i.e. a perfect copyfile source.

The Exploit

lpe.m — three stages, all as a non-admin user:

  1. Steal the root-owned clone. ACL the staging dir (allow read,write,append,writeextattr,...,file_inherit,directory_inherit), stage a hardlink to /etc/group, and invoke createAdditionInStorage:. revisiond's clonefile creates a root-owned clone at the predictable {src}_XXXXXX path; a racing thread renames it away before revisiond's own rename, so the walker errors out — the clone is never moved to the genstore and its inherited ACL is never stripped. It stays in staging: root-owned, ACL'd, and F_GETPATH still resolves to the staging path so _pathIsStaged: passes.

  2. Fire it. Open the clone O_WRONLY through the inherited ACL, ftruncate + write <user> ALL=(ALL) NOPASSWD: ALL, set a com.apple.decmpfs xattr so revisiond's clonefile-try-first fails and it falls back to copyfile (a background thread keeps re-setting it as revisiond strips it), and link() a second name onto it — the hardlink-break walker only fires for nlink ≥ 2.

  3. Overwrite /etc/sudoers. Plant hardlinks to /etc/sudoers at both predictable copyfile destinations ({src2}_XXXXXX and {src2}_lnk_XXXXXX — ATTR_CMN_FULLPATH may resolve to either dirent of the two-link inode) and re-invoke createAdditionInStorage:. revisiond copyfiles the armed, root-owned source onto the /etc/sudoers inode, then fchowns it back to root:

    $ sudo -n whoami
    root
    

Usage

# backup first (restoration only — the exploit itself needs no root)
sudo cp -p /etc/sudoers /tmp/sudoers.orig

clang -fobjc-arc -framework Foundation -o lpe lpe.m
./lpe              # run as a non-admin user — no sudo, no password
sudo -n whoami     # → root
./lpe cleanup      # restore /etc/sudoers afterwards

Credits

This issue was also independently found by several researchers — congratulations to YingQi Shi (@Mas0nShi) of DBAppSecurity's WeBin lab, Junyeong Lee (jylab.github.io), Andreas Jaegersberger & Ro Achterberg of Nosebeard Labs, Jaeyeong Lee, and Gergely Kalman (@gergely_kalman). Great to see it patched.

Writeup and exploit by Lyutoon.

Found and exploited automatically by my agent, powered by GLM-5.3.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    634
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    417
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    383
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    328
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    288

Explore all tools

Browse our collection of tools

View all tools →