Inappropriate implementation in Updater (CVE-2026-12468)
A race condition in the macOS updater history unzip code lets a compromised sandboxed child process plant a symbolic link in a shared temporary directory. The browser process then follows that link when writing the uploaded ZIP, truncating and overwriting an arbitrary file outside the sandbox, potentially leading to sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 9 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: A potential race condition in UnzipUpdaterHistoryFilesImpl on macOS allows a compromised sandboxed process to plant a symbolic link in a shared temporary directory. Because base::WriteFile uses POSIX creat(), which follows symbolic links, the browser process can be tricked into truncating and overwriting arbitrary files outside the sandbox. This can potentially be leveraged to escape sandbox isolation.
Affected files:
chrome/browser/ui/webui/updater/updater_page_handler.cc
Estimated timestamp from git blame: 2026-03-19
Description
A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the UnzipUpdaterHistoryFilesImpl function on macOS. The issue arises from the use of a shared temporary directory in combination with a file creation utility that follows symbolic links.
Root Cause
-
Shared Temporary Directory: In
chrome/browser/ui/webui/updater/updater_page_handler.cc(lines 220-221),UnzipUpdaterHistoryFilesImplcreates a temporary directory usingtemp_dir.CreateUniqueTempDir(). On macOS, this resolves toNSTemporaryDirectory()(defined via_CS_DARWIN_USER_TEMP_DIRinbase/files/file_util_apple.mm). Several heavily sandboxed child processes (such as the GPU, Network, and On-Device Model Execution processes) are explicitly granted read and write access todarwin-user-temp-dirin their Seatbelt profiles (e.g.,sandbox/policy/mac/network.sblines 50-53,sandbox/policy/mac/gpu.sblines 124-128). Because these child processes run under the same User ID (UID) as the browser process, standard UNIX Discretionary Access Control (DAC) does not isolate their files. -
Symlink-Following File Write: The browser process subsequently creates a file with a static name within the temporary directory and writes the user-supplied ZIP data into it:
C++ base::FilePath archive_path = temp_dir.GetPath().AppendASCII("input.zip"); if (!base::WriteFile(archive_path, zip_data)) { ... }On POSIX platforms,
base::WriteFileis implemented using thecreat()system call (base/files/file_util_posix.ccline 1157), which is equivalent toopen(..., O_WRONLY | O_CREAT | O_TRUNC):C++ int fd = HANDLE_EINTR(creat(filename.value().c_str(), 0666));Because this call does not specify the
O_NOFOLLOWflag, it resolves and follows symbolic links.
Potential Attack Scenario
Note: The following steps are potential/theoretical. Our analysis is based on static code review, and we have not validated this path with an active exploit payload.
-
An attacker compromises a sandboxed child process (e.g., the Network or GPU process) via an independent renderer-to-helper vulnerability.
-
In the compromised process, the attacker executes a fast loop calling
readdiron the directory returned byconfstr(_CS_DARWIN_USER_TEMP_DIR). It monitors the creation of any new directories starting withscoped_dir. -
The victim user navigates to
chrome://updaterand triggers a history log ZIP upload. -
The browser process executes
temp_dir.CreateUniqueTempDir()to create a directory (e.g.,scoped_dirA1B2C3). -
The attacker's loop instantly detects the new directory and creates a symbolic link inside it:
C symlink("/Users/[username]/.zshrc", "scoped_dirA1B2C3/input.zip"); -
The browser process proceeds to call
base::WriteFile(archive_path, zip_data). The kernel follows theinput.zipsymbolic link, truncating and overwriting the user's.zshrcfile with the ZIP payload. -
When the user later opens a terminal, the overwritten
.zshrcis sourced, executing arbitrary commands outside the sandbox with full user privileges.
Suggested Remediation
To mitigate this risk, avoid using symbolic-link-following file writes in shared temporary directories.
- Use
O_NOFOLLOW: Modify the file-writing logic to open the target path with theO_NOFOLLOWoption (or usebase::Filewithbase::File::FLAG_WIN_SHARE_DELETEor similar flags that prevent symbolic link resolution on POSIX). - Use Safe Temp File APIs: Instead of appending a static filename to a directory, use
base::CreateTemporaryFileInDirwhich safely creates a uniquely named file with restrictive file permissions. - Isolate Extraction: Alternatively, perform extraction in a location that is not shared with sandboxed child processes.
Evaluated with Chrome root at commit: 3947e01999a53d4e2382e39736cb79d79c7dffcf
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 combination of a temporary directory shared with sandboxed child processes and a file write that follows symbolic links (creat without O_NOFOLLOW), creating a TOCTOU race.
Impact
A compromised sandboxed process could overwrite arbitrary user files and potentially escape the sandbox, though the report notes this is theoretical and not validated with an active exploit.
What the attacker needed
MacOS; compromised sandboxed child process; victim uploads a ZIP on chrome://updater; attacker wins a timing race
The fix
The file write should avoid following symbolic links (for example by using O_NOFOLLOW or a safe temporary-file API) or extraction should happen in a directory not shared with sandboxed processes.
How it was found
- Compromise a sandboxed child process via an independent vulnerability.
- In the compromised process, loop over the shared temp directory watching for new scoped_dir directories.
- The victim uploads a history log ZIP on chrome://updater, causing the browser to create a temp directory.
- The attacker's loop detects the new directory and creates a symbolic link named input.zip pointing to a target file.
- The browser writes the ZIP data to input.zip, following the link and overwriting the target file.
- When the user later opens a terminal, the overwritten startup file is sourced and runs attacker commands.
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 sandbox is a security boundary that limits what a compromised process can do. Here, a shared temporary folder is writable by several sandboxed processes, and the browser writes a file there in a way that follows shortcuts (symbolic links). If an attacker wins a timing race, the browser writes through the shortcut to a file it should not touch, such as a shell startup file, which can later run attacker commands.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.