Skip to content
File upload Disclosed report Intermediate CVE-2026-74952

Arbitrary file overwrite and destruction via symlink in macOS elevated updater

The macOS elevated updater helper writes log and status files into a user-writable cache directory without checking for symlinks, so a local unprivileged user can replace those files with symlinks to root-owned files. When the helper runs with administrator credentials, it follows the symlink and overwrites the target file with updater log content, allowing destruction of files such as LaunchDaemon plists.

Tomoya Nakanishi Follow

Originally disclosed on Mozilla

  • Fixed in 4 months
  • Paid in 5 months
  • Disclosed after 4 months
Text
Platform: Desktop (macOS)
Version: Firefox 149.0b3

The Firefox macOS elevated updater helper (`org.mozilla.updater`) can be used by a local unprivileged user to truncate and overwrite arbitrary files that the user would not normally have write access to. The overwritten content is updater-internal status strings and log lines, not attacker-controlled data, so this is a file-clobber primitive rather than an arbitrary-content write.

Steps to reproduce:

Because the issue is triggered during an update, end-to-end reproduction requires starting from a build that still has an update available. The practical reproduction below therefore uses Firefox 149.0b3. as the installed starting point, while the affected code paths are still present in current source and Nightly builds (150.0a1 as of 2026-03-06).

Setup:
- `Firefox.app` must not be writable by the current user. This is the default when Firefox is installed system-wide via the official `.pkg`, which is the standard deployment method in Jamf/MDM-managed environments. In the reproduction below, assume Firefox was installed via `.pkg` ([https://ftp.mozilla.org/pub/firefox/releases/149.0b3/mac/en-US/Firefox%20149.0b3.pkg](https://ftp.mozilla.org/pub/firefox/releases/149.0b3/mac/en-US/Firefox%20149.0b3.pkg)).

Steps:
1. Create a root-owned test file to use as the symlink target:
   '''sh
   sudo sh -c 'echo "hello" > /tmp/root_test_file'
   sudo chown root:wheel /tmp/root_test_file
   sudo chmod 644 /tmp/root_test_file
   cat /tmp/root_test_file
   '''
2. Launch Firefox, open `Menu > About Firefox`, and wait for the update to finish downloading.
3. Click `Restart to Update`. After Firefox restarts, it shows the Update Elevation dialog. Do not click anything yet.
4. The update cache directory has now been populated. Place a symlink from `update-elevated.log` to the root-owned test file:
   '''sh
   CACHE="$HOME/Library/Caches/Mozilla/updates/Applications/Firefox/updates/0"
   rm -f "$CACHE/update-elevated.log"
   ln -s /tmp/root_test_file "$CACHE/update-elevated.log"
   '''
5. Return to the Update Elevation dialog in Firefox and click `Restart Now`.
6. When macOS displays the authorization dialog, enter administrator credentials. The root helper opens `update-elevated.log` to write its logs, which follows the symlink and overwrites `/tmp/root_test_file`.
7. Verify that the root-owned file has been clobbered:
   '''sh
   cat /tmp/root_test_file
   # The content is now the updater's log output, starting with something like:
   # "Patch Directory: ..."
   ls -la /tmp/root_test_file # Owner is still root:wheel, but the content was overwritten by the unprivileged user's symlink
   '''

Both `update.status` and `update-elevated.log` are vulnerable to this symlink attack, but targeting `update-elevated.log` is recommended because overwriting `update.status` can disrupt the update process's state tracking.

Impact:
A local unprivileged user can use this primitive to truncate and overwrite any root-owned file that is not protected by SIP.

Specifically, an attacker could target plist files in `/Library/LaunchDaemons/`, which are not protected by SIP. Overwriting a LaunchDaemon configuration file with updater logs renders it as unparseable XML, causing `launchd` to silently skip loading the service upon reboot. This is a critical attack surface that directly leads to the permanent disablement of third-party security services (such as EDR, AV, or VPN agents) and can be a stepping stone for further privilege escalation.

Similar symlink-follow vulnerabilities in the privileged updater are fixed as security bugs:
- Bug 1215648
- Bug 1246945
- Bug 1246972
- Bug 1917536

Recommended Fix:
The vulnerability occurs because the elevated updater writes `update.status` and `update-elevated.log` into the per-user update cache `~/Library/Caches/Mozilla/updates/.../updates/0/` using plain `NS_tfopen()` without `O_NOFOLLOW` or `lstat` checks.
To resolve this, a macOS equivalent of the Windows `GetSecureOutputFilePath()` should be implemented to guarantee safe file creation paths. Alternatively, `open()` should be used with `O_NOFOLLOW | O_CREAT | O_TRUNC` flags.

The original report as published on Mozilla's Bugzilla, by Tomoya Nakanishi. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

The elevated updater opens files in a user-writable cache directory using plain file-open calls without O_NOFOLLOW or lstat checks, so it follows symlinks placed there by an unprivileged user.

Impact

A local unprivileged user could truncate and overwrite any root-owned file not protected by SIP, such as LaunchDaemon plists, potentially disabling third-party security services and enabling further privilege escalation.

What the attacker needed

Local unprivileged user; Firefox installed via .pkg (not user-writable); an update available and downloaded; administrator credentials entered in the elevation dialog

The fix

The updater should use a secure file creation path, such as open() with O_NOFOLLOW | O_CREAT | O_TRUNC, or a macOS equivalent of GetSecureOutputFilePath().

How it was found

  1. Create a root-owned test file to use as the symlink target.
  2. Launch Firefox, open About Firefox, and wait for the update to finish downloading.
  3. Click Restart to Update and wait for the Update Elevation dialog without clicking anything.
  4. Replace update-elevated.log in the update cache directory with a symlink to the root-owned test file.
  5. Return to the Update Elevation dialog and click Restart Now.
  6. Enter administrator credentials in the macOS authorization dialog; the root helper follows the symlink and overwrites the target file.

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.

A symlink is like a shortcut that points to another file. The updater runs with high privileges and writes its log to a file in a folder the normal user can change. By replacing that log file with a shortcut to a protected system file, the user tricks the privileged updater into overwriting the protected file with log text.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by Tomoya Nakanishi

View all

4 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.