Race condition in Extensions (CVE-2026-91748)
A sandboxed child process on macOS could exploit a time-of-check to time-of-use symlink race in the extension packaging workflow to make the browser process overwrite or read arbitrary user files, escaping the sandbox. The report describes a potential attack path but no working proof of concept.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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 compromised macOS child process sharing the same UID can exploit a TOCTOU symlink race in ExtensionCreator under the shared temp directory. This allows the sandboxed process to force the unsandboxed browser process to overwrite or read arbitrary user files, enabling a full sandbox escape.
Affected files:
extensions/browser/extension_creator.cccomponents/crx_file/crx_creator.cc
Estimated timestamp from git blame: 2009-06-09
Detailed Potential Vulnerability Analysis
Summary
A potential security vulnerability exists on macOS where a compromised, sandboxed child process (such as the Network, GPU, or On-Device Model execution process) can escape its sandbox. This is achieved by exploiting a Time-of-Check to Time-of-Use (TOCTOU) symbolic link race condition within the browser process's ExtensionCreator class during the "Pack Extension" workflow.
Root Cause Analysis
-
Shared Temporary Directory on macOS: On macOS, the browser process and sandboxed child processes run under the same User ID (UID). The browser process passes the per-user Darwin temporary directory (
_CS_DARWIN_USER_TEMP_DIR) to the Seatbelt sandbox of child processes like the GPU and Network services, allowing them full read/write access under this directory (content/browser/sandbox_parameters_mac.mm):SCHEME ; sandbox/policy/mac/network.sb (allow file-read* file-write* (subpath (param darwin-user-temp-dir)))Because they share the same UID, the default
0700permission set bymkdtempwhen creating temporary directories does not prevent sandboxed child processes from writing inside them. -
Insecure Path-Based File Openings (No
O_NOFOLLOW/O_EXCL): During the packaging process,ExtensionCreator::CreateCrxAndPerformCleanupcreates a temporary directory and generates a fixed-name ZIP fileextension.zipinside it:C++ // extensions/browser/extension_creator.cc *zip_path = temp_path.Append(FILE_PATH_LITERAL("extension.zip"));The file is created via minizip's
fopen(path, "wb")wrapper, which corresponds toopen(path, O_WRONLY|O_CREAT|O_TRUNC, 0666)(third_party/zlib/contrib/minizip/ioapi.c). This call implicitly follows symbolic links and truncates the target. -
Insecure Path-Based Re-opening: After the ZIP file is created, it is re-opened by
crx_file::Createviabase::FileusingFLAG_OPEN | FLAG_READ(components/crx_file/crx_creator.cc):C++ base::File file(zip_path, base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WIN_SHARE_DELETE);On POSIX platforms,
base::Fileconstructs rawopen(path, O_RDONLY)calls (base/files/file_posix.cc) withoutO_NOFOLLOWand does not prevent opening symbolic links.
Suggested Potential Attack Scenario / Steps to Trigger
Note: These steps represent a suggested/potential attack path. Our tooling agent does not have the ability to run code, and a fully functional proof of concept has not yet been executed.
-
Pre-requisites: An attacker has already achieved remote code execution (RCE) in a sandboxed child process (such as the Network, GPU, or On-Device Model execution process) on macOS.
-
Directory Monitoring: The compromised child process sets up a
kqueuedirectory monitor (viaEVFILT_VNODEandNOTE_WRITE) on_CS_DARWIN_USER_TEMP_DIRto listen for new subdirectory creations matching the patterncom.google.Chrome.scoped_dir.XXXXXX. -
Trigger "Pack Extension": The "Pack Extension" workflow is initiated in the browser process (e.g., via developer interactions or by exploiting an allowlisted API endpoint).
-
Symlink Insertion (Arbitrary Write): As soon as the browser process creates the
scoped_dir.XXXXXXdirectory, the attacker's monitoring script detects it and immediately creates a symlink pointing to a sensitive user-writable file:Bash ln -s /Users/victim/.zprofile /var/folders/.../com.google.Chrome.scoped_dir.XXXXXX/extension.zipWhen the browser writes the ZIP file, the symlink is followed, and
/Users/victim/.zprofileis truncated and overwritten with the ZIP archive data. -
Symlink Swap (Arbitrary Read): To achieve arbitrary read, the attacker monitors the folder for the completion of the ZIP write. Once closed, the attacker unlinks
extension.zipand re-creates it as a symlink pointing to a highly sensitive file:Bash rm /var/folders/.../com.google.Chrome.scoped_dir.XXXXXX/extension.zip ln -s "/Users/victim/Library/Application Support/Google/Chrome/Default/Cookies" /var/folders/.../com.google.Chrome.scoped_dir.XXXXXX/extension.zipThe browser process calls
crx_file::Createwhich opensextension.zipusingO_RDONLYwithoutO_NOFOLLOW, thereby packing the sensitiveCookiesdatabase into the final output.crxfile.
Suggested Remediation
To mitigate this risk, the file operations during extension packaging must be hardened against symlink attacks:
- Pass open file descriptors instead of file paths: Avoid closing and reopening files by path.
ZipWithFilterCallbackshould write to a pre-opened file descriptor/handle, andcrx_file::Createshould consume that same pre-opened file descriptor directly. - Use safe open flags: If a path must be opened, ensure
O_NOFOLLOW(or equivalent) is used to prevent resolving symbolic links, or open the file using a safe API that does not follow symlinks (e.g., standard POSIX open withO_NOFOLLOW/O_EXCLpassed to a wrapper).
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 extension packaging code opens files by path without O_NOFOLLOW or O_EXCL, so a symlink placed in a shared temporary directory is followed.
Impact
A compromised sandboxed process could escape the sandbox and overwrite or read arbitrary user files, though no exploit has been demonstrated.
What the attacker needed
MacOS; Code execution in a sandboxed child process; Pack Extension workflow triggered
The fix
The file operations should be hardened by passing open file descriptors instead of paths and by using O_NOFOLLOW or equivalent safe open flags.
How it was found
- Attacker gains code execution in a sandboxed child process on macOS.
- The compromised process monitors the shared temporary directory for new subdirectories.
- The 'Pack Extension' workflow is triggered in the browser process.
- The attacker creates a symlink named extension.zip pointing to a sensitive file, causing arbitrary write.
- After the ZIP is written, the attacker replaces extension.zip with a symlink to another sensitive file, causing arbitrary read when the CRX is created.
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 process already inside the sandbox could trick the browser into following a symbolic link (a shortcut to another file) and writing to or reading a file it should not access. This would let the attacker break out of the sandbox.
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.