Skip to content
Race condition Advisory Advanced CVE-2026-106412

Race condition in Core (CVE-2026-106412)

A temporary file used to build feedback zip attachments is created securely but then reopened by path, so a compromised sandboxed child process sharing the temp directory could swap it for a symbolic link. That could let the attacker overwrite or read arbitrary files with browser privileges, potentially escaping the sandbox on macOS.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 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 potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists on macOS in feedback_util::ZipString. The browser creates a temporary file under the shared temporary directory, discards the secure file descriptor, and subsequently reopens the path via fopen inside minizip, which resolves symbolic links. A compromised sandboxed child process with write permissions to this directory can swap the file with a symbolic link to overwrite arbitrary files with browser privileges.

Affected files:

  • components/feedback/feedback_util.cc

Estimated timestamp from git blame: 2013-03-22

Root Cause Analysis

In components/feedback/feedback_util.cc, feedback_util::ZipString generates a temporary file to store compressed log information. The temporary file is created via base::CreateTemporaryFile, which calls CreateTemporaryFileInDir in POSIX environments. Under the hood, this function securely creates a file with unique random characters and 0600 permissions using mkstemp and returns a valid file descriptor. However, CreateTemporaryFileInDir discards this file descriptor upon returning, meaning the secure file handle is closed:

C++
// base/files/file_util_posix.cc:862-867
bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file) {
  ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK);
  ScopedFD fd = CreateAndOpenFdForTemporaryFileInDir(dir, temp_file);
  return fd.is_valid();
}

This leaves the browser process holding only a plain path string in zip_file. It then attempts to perform zip compression into this path:

C++
// components/feedback/feedback_util.cc:53-59
if (!base::CreateTemporaryFile(&zip_file)) {
  return std::nullopt;
}

std::string compressed_logs;
bool succeed = zip::Zip(temp_dir.GetPath(), zip_file, false) &&
               base::ReadFileToString(zip_file, &compressed_logs);

When zip::Zip executes, the path is opened via zipOpen2_64 inside the minizip library, which maps to fopen(path, "wb"). Standard fopen follows symbolic links and does not employ flags like O_NOFOLLOW or O_EXCL during open.

Shared Trust Boundary on macOS

While macOS sandboxed helper processes (such as the Network Service, GPU, or On-Device Model processes) run inside a sandbox, they are granted read/write permissions to the shared user temporary directory _CS_DARWIN_USER_TEMP_DIR via custom Seatbelt sandbox profiles. For example, the Network Service sandbox profile (sandbox/policy/mac/network.sb) allows:

SCHEME
(allow file-read* file-write*
  (subpath (param darwin-user-temp-dir)))

And the On-Device Model Execution profile (sandbox/policy/mac/on_device_model_execution.sb) similarly allows:

SCHEME
(allow file-read* file-write*
  (subpath (param darwin-user-temp-dir)))

Because all Chrome processes execute under the same macOS UID, standard POSIX filesystem permissions offer no isolation inside this shared directory. Thus, a compromised helper process is fully capable of deleting or swapping files in the temporary directory.

Potential Attack Scenario

Note: These are potential steps as our tooling is static and we have not run an active proof-of-concept.

  1. An attacker gains remote code execution (RCE) in a sandboxed child process, such as the Network Service process.
  2. The compromised child process spawns a thread to continuously poll SHARED_TEMP_DIR (e.g., /var/folders/xx/yyyyy_zzzz/T/) looking for entries matching .com.google.Chrome.*.
  3. The user initiates a feedback report (e.g., via Help -> Report an Issue), which triggers feedback_util::ZipString on a background thread in the browser process.
  4. Between the browser closing the secure mkstemp file descriptor in base::CreateTemporaryFile and re-opening it in zip::Zip, a tight TOCTOU race window opens.
  5. The attacker's polling thread detects the temporary file, immediately deletes it via unlink, and replaces it with a symbolic link pointing to a critical file in the user's home folder (e.g., ~/.zshrc).
  6. The browser process executes zip::Zip, which opens the path with fopen(path, "wb"), resolving the symlink and truncating the target file to 0 bytes before writing a zip payload inside.
  7. Alternatively, the attacker can target the second race window between zip::Zip completing and base::ReadFileToString reading the file. By replacing the temporary zip file with a symbolic link to a sensitive resource (e.g., ~/.ssh/id_rsa), the browser reads the file contents into the feedback attachment. The attacker, controlling the compromised Network Service, can intercept and exfiltrate this sensitive data during upload.

Impact

If successfully exploited, this provides a sandbox escape on macOS, allowing a compromised helper process to achieve arbitrary file writes (with truncated/zip content) and arbitrary file reads with browser privilege.

Suggested Remediation

Instead of discarding the file descriptor and opening the temporary zip file by path, the code should utilize a file descriptor-based API. Specifically, use base::CreateAndOpenTemporaryFile (or similar helper) to securely hold onto the open file descriptor, and then utilize the descriptor-based zipping API zip::ZipFiles which accepts a destination file descriptor dest_fd instead of a FilePath destination:

C++
// Use a file descriptor based flow rather than path based zip operations
bool ZipFiles(const base::FilePath& src_dir,
              Paths src_relative_paths,
              int dest_fd);

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.

Raised in root component due to access or custom field issues on 1033360

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 temporary file's secure file descriptor is discarded and the path is reopened with fopen, which follows symbolic links, creating a time-of-check to time-of-use gap.

Impact

If exploited, this could provide a sandbox escape on macOS with arbitrary file writes and reads at browser privilege, though the report is based on static analysis and no proof-of-concept was run.

What the attacker needed

Code execution in a sandboxed child process; macOS with shared temp directory access; user starts a feedback report; attacker wins a tight race window

The fix

The code should keep the open file descriptor and use a descriptor-based zipping API instead of reopening the temporary file by path.

How it was found

  1. An attacker gains code execution in a sandboxed child process such as the Network Service.
  2. The compromised process polls the shared temporary directory for Chrome temporary files.
  3. The user starts a feedback report, triggering the zip routine in the browser process.
  4. The attacker deletes the temporary file and replaces it with a symbolic link to a target file.
  5. The browser opens the path, follows the link and truncates or reads 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.

When Chrome builds a feedback report it writes a temporary zip file. It creates that file safely, but then closes the safe handle and later opens the file again just by its name. Another Chrome process that has been hacked can, in that gap, replace the file with a shortcut (a symbolic link) pointing at a personal file, so Chrome ends up writing to or reading from the wrong file.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.