Insufficient validation of untrusted input in Updater (CVE-2026-17861)
The macOS system-scope GoogleUpdater builds active-bit file paths from unsanitised application IDs, so traversal sequences can point outside the intended Actives folder. Because /Users/Shared is root-owned and writable by root, the UID equality check passes and a local non-admin attacker could cause the root daemon to delete arbitrary root-owned files.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 55 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The system-scope GoogleUpdater on macOS computes active-bit file paths using unsanitized app IDs, allowing directory traversal. By exploiting directory ownership check flaws via /Users/Shared (which is root-owned), a local non-admin attacker can potentially bypass UID validation to delete arbitrary root-owned files. This primitive can be triggered on-demand via the unprivileged Mojo stub, leading to potential local privilege escalation.
Affected files:
chrome/updater/activity_impl_util_mac.ccchrome/updater/activity_impl_posix.ccchrome/updater/mac/privileged_helper/service.mm
Estimated timestamp from git blame: 2021-03-23
Detailed Description
A potential logic and path traversal vulnerability has been identified in the macOS system-scope (root-privileged) GoogleUpdater daemon. The updater processes 'active-bit' files to track user activity per application. However, because application IDs are not properly sanitized against path traversal sequences, and because /Users/Shared is treated as a valid home directory, a local attacker can potentially exploit this behavior to delete arbitrary root-owned files on the system.
1. Vulnerable Path Construction (activity_impl_util_mac.cc)
In chrome/updater/activity_impl_util_mac.cc, the function GetActiveFile constructs the file path for tracking the active state of an application using the application's ID (id):
base::FilePath GetActiveFile(const base::FilePath& home_dir,
const std::string& id) {
return home_dir.Append("Library")
.Append(COMPANY_SHORTNAME_STRING)
.Append(KEYSTONE_NAME)
.Append("Actives")
.Append(id);
}
Because id is appended directly without validation or sanitization, if an application is registered with an ID containing path traversal components (e.g., ../../../../../../../../private/etc/sudoers.d/readme), the resulting FilePath will lexically point to a location outside the intended folder structure.
2. Root Unlink Logic and Bypass (activity_impl_posix.cc)
In chrome/updater/activity_impl_posix.cc, the ClearActiveBit function performs the deletion of the tracking file:
void ClearActiveBit(const base::FilePath& home_dir, const std::string& id) {
struct stat home_buffer = {0};
if (stat(home_dir.value().c_str(), &home_buffer)) {
return;
}
const base::FilePath active_file_path = GetActiveFile(home_dir, id);
const base::ScopedFD dir_fd(
HANDLE_EINTR(open(active_file_path.DirName().value().c_str(), O_RDONLY)));
if (!dir_fd.is_valid()) {
return;
}
struct stat active_file_buffer = {0};
if (fstatat(dir_fd.get(), active_file_path.BaseName().value().c_str(),
&active_file_buffer, AT_SYMLINK_NOFOLLOW)) {
return;
}
if (active_file_buffer.st_uid != home_buffer.st_uid) {
return;
}
unlinkat(dir_fd.get(), active_file_path.BaseName().value().c_str(), 0);
}
To prevent unauthorized file deletion, the function checks that the UID of the target file (active_file_buffer.st_uid) matches the UID of the home directory parent (home_buffer.st_uid).
However, in GetHomeDirPaths(UpdaterScope::kSystem), the updater enumerates directories under /Users and checks if they are writable. Running as root, /Users/Shared is writable. Because /Users/Shared is owned by root (UID 0), home_buffer.st_uid evaluates to 0.
If the target file (resolved via path traversal) is also owned by root, the UID check becomes 0 == 0, which evaluates to true. This allows any root-owned file to be deleted if the traversal is initiated relative to /Users/Shared.
3. Potential Trigger Mechanism
An unprivileged user can connect to the system-scope Mojo IPC service. While privileged methods like RegisterApp are blocked for untrusted callers, unprivileged callers can invoke UpdateAll or RunPeriodicTasks via the UpdateServiceStubUntrusted wrapper (defined in chrome/updater/app/server/update_service_stub.cc). These methods prompt the updater to check for updates and update metadata, which sequentially triggers GetAndClearActiveBits and invokes the vulnerable ClearActiveBit loop.
Potential Attack Steps
Note: These steps are suggested based on static code analysis; our tooling does not currently run code to provide a dynamic proof of concept.
-
Directory Setup: A local unprivileged attacker creates the target directories under
/Users/Sharedto ensure the parent path resolution succeeds:Bash mkdir -p "/Users/Shared/Library/Google/GoogleSoftwareUpdate/Actives" -
App Registration: The attacker seeks to register an application ID containing the path traversal payload (e.g.,
../../../../../../../../private/etc/sudoers.d/readme). This could potentially be achieved by exploiting the SMJobBless helper's acceptance of browser-supplied Info.plist values during a promotion race, or via other local register injection vectors. -
Mojo Invocation: The attacker connects to the system-scope updater's Mojo IPC interface as an unprivileged client and calls
UpdateAll()orRunPeriodicTasks()to trigger the sweep. -
Resulting Deletion: The system daemon, executing as root, traverses from
/Users/Shared/Library/Google/GoogleSoftwareUpdate/Actives/back to/private/etc/sudoers.d/, checks that the target file is root-owned (matching/Users/Shared's root owner), and successfully unlinks the file viaunlinkat.
Suggested Remediation
- Input Sanitization: Enforce strict validation on application IDs during registration. Reject any
app_idcontaining path separators (/), parent directory references (..), or control characters. Ideally, validateapp_idagainst a strict alphanumeric, GUID, or reverse-domain whitelist format. - Path Resolution Safety: In
activity_impl_posix.ccoractivity_impl_util_mac.cc, utilizebase::SafeBaseNameto ensure that appended application IDs cannot alter the parent directory path structure.
Evaluated with Chrome root at commit: e9507a33bb4148ee071aaaf8a7e9ad68770359bf
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 application ID is appended to a path without sanitisation, and the ownership check compares against a root-owned shared directory, so traversal to other root-owned files passes validation.
Impact
A local non-admin attacker could potentially delete arbitrary root-owned files, which may lead to local privilege escalation; the report is based on static analysis and no working exploit was demonstrated.
What the attacker needed
Local unprivileged access to the Mac; ability to register a crafted app ID; shared users folder present
The fix
Application IDs should be strictly validated to reject path separators and parent references, and path construction should use a safe base-name helper so the parent directory cannot change.
How it was found
- Create the expected Actives directory tree under the shared users folder so the parent path resolves.
- Get an application ID containing traversal sequences registered with the updater.
- Connect to the system updater's IPC interface as an unprivileged client and call an update or periodic-task method.
- The root daemon resolves the traversed path, sees the target is root-owned like the shared folder, and unlinks it.
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.
The updater runs with full administrator rights and keeps small marker files for each app, naming them after the app's ID. If that name can contain 'go up a folder' sequences, the updater can be pointed at any file on the disk. A safety check compares the file's owner with the owner of the user's home folder, but one shared folder is owned by the administrator account, so the check passes and the file gets deleted.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.