CleanMyMac X truncateFileAtPath Privilege Escalation Vulnerability
The privileged helper tool in CleanMyMac X exposes a truncateFileAtPath function that accepts a caller-supplied file path without validating which application is calling it. Any local application could therefore use the root-running helper to truncate or delete files on the root file system.
Originally disclosed on Cisco Talos
The CleanMyMac X software contains an exploitable privilege escalation vulnerability that exists due to improper input validation. An attacker with local access could use this vulnerability to modify the file system as root.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the privileged helper's truncateFileAtPath method trusted the caller-supplied path and never verified the identity or entitlements of the calling application.
Impact
A local non-root attacker could modify or delete files on the root file system through the root helper, crossing a privilege boundary; the proof of concept required an administrator password only to set up test files beforehand.
What the attacker needed
Local access to the Mac; ability to run a program as a normal user
The fix
The vendor patched the issue, presumably by validating the calling application before performing privileged file operations.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Some Mac apps install a small background helper that runs with the highest system permissions so it can clean up files the normal user cannot touch. This helper accepted a file path from any program on the machine and never checked who was asking. That meant an ordinary user-level program could get the helper to wipe important system files, which a normal user should not be allowed to do.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.