Skip to content
Path traversal Advisory Advanced CVE-2026-78985

Incorrect reference resolution in FileSystem (CVE-2026-78985)

LocalFileUtil fails to validate symbolic links in operations like EnsureFileExists and Truncate, allowing a malicious app to overwrite arbitrary host files by copying a stream onto a symlink. This bypasses the sandbox and could lead to remote code execution.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 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 without the security team.

Overview: LocalFileUtil fails to validate symbolic links in operations like EnsureFileExists and Truncate. By executing a stream copy onto a symlink, a malicious app can potentially overwrite arbitrary host files. This bypasses the sandbox and could lead to Remote Code Execution.

Affected files:

  • storage/browser/file_system/local_file_util.cc
  • storage/browser/file_system/local_file_stream_writer.cc
  • storage/browser/file_system/native_file_util.cc

Estimated timestamp from git blame: 2024-08-07

Verdict: Potential arbitrary file overwrite leading to Sandbox Escape. Suggested Fix: Apply the IsHiddenItem() validation to EnsureFileExists, Truncate, CopyOrMoveFile, and CopyInForeignFile within storage/browser/file_system/local_file_util.cc. Additionally, enforce O_NOFOLLOW equivalents during file initialization in LocalFileStreamWriter.

Technical Details

Initial logic and routing parameters in the FileSystem API are validated; operations correctly resolve through IsolatedFileSystemBackend down to LocalFileUtil. While methods like GetFileInfo properly invoke IsHiddenItem() to block symlinks in sandboxed contexts, the remaining execution path completely bypasses this boundary.

During a stream copy operation (StreamCopyOrMoveImpl) onto an existing symlink, the system jumps directly to executing EnsureFileExists followed by Truncate. These functions instantiate base::File using base::File::FLAG_OPEN | base::File::FLAG_WRITE. Because this directly translates to standard POSIX open calls without O_NOFOLLOW, the underlying target file is silently followed, truncated, and directly overwritten with the stream's payload by the browser process.

Suggested Reproduction Steps

(Note: These are potential steps; our tooling cannot run code to verify a working proof of concept.)

  1. Standard processing applied: The user extracts and selects an attacker-provided directory containing a symlink (e.g., pointing to ~/.bashrc) and a malicious payload file.
  2. The attacker's web or Platform App invokes the copyTo() API to copy the payload over the symlink.
  3. The browser process natively follows the symlink without validation, arbitrarily overwriting the sensitive host file.

Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad


Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.

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 file operations EnsureFileExists and Truncate open files without checking for symbolic links, unlike other methods that call IsHiddenItem().

Impact

A malicious app could overwrite arbitrary host files, bypassing the sandbox and potentially leading to remote code execution.

What the attacker needed

User extracts and selects attacker directory; attacker app invokes copyTo() API

The fix

The suggested fix is to apply the IsHiddenItem() validation to EnsureFileExists, Truncate, CopyOrMoveFile, and CopyInForeignFile, and to enforce O_NOFOLLOW equivalents during file initialization in LocalFileStreamWriter.

How it was found

  1. The user extracts and selects an attacker-provided directory containing a symlink and a malicious payload file.
  2. The attacker's web or Platform App invokes the copyTo() API to copy the payload over the symlink.
  3. The browser process natively follows the symlink without validation, arbitrarily overwriting the sensitive host 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 symbolic link is a shortcut that points to another file. The browser's file system code did not check whether a file was a shortcut before writing to it, so a malicious app could make the browser overwrite important files on the user's computer. This breaks the security sandbox that normally keeps web apps away from the rest of the system.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.