
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.
revisiond Local Privilege EscalationStorage 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.
Full non-admin-user → root run on macOS 26.6 (25G72): demo.mov
Four issues chain together in revisiond's document-staging flow:
Ungated XPC listener. -[GSListener listener:shouldAcceptNewConnection:] (@ 0x1000130dc) accepts every connection — no entitlement, audit-token, or sandbox check.
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.
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.
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.
lpe.m — three stages, all as a non-admin user:
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.
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.
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
# 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
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.