Skip to content
Access control Advisory Advanced CVE-2026-113034

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

A logic error in the RemoveSymlinks function fails to check if the base directory of a file enumeration is itself a symbolic link. A compromised renderer could exploit this to gain read access to arbitrary local files by requesting enumeration of a symlink within a directory it already has permission to read.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 7 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A logic error in FileChooserImpl::RemoveSymlinks fails to check if the base directory of a file enumeration is itself a symbolic link. A compromised renderer can exploit this by requesting enumeration of a symlink within a directory it already has permission to read, bypassing security checks and gaining unauthorized read access to arbitrary local files.

Affected files:

  • content/browser/web_contents/file_chooser_impl.cc
  • chrome/browser/file_select_helper.cc
  • content/browser/child_process_security_policy_impl.cc

Estimated timestamp from git blame: 2022-11-03

Summary

A potential vulnerability exists in content/browser/web_contents/file_chooser_impl.cc where the RemoveSymlinks function incorrectly assumes the base directory of an enumeration is not a symlink. This allows a compromised renderer to gain read access to arbitrary files on the local filesystem by exploiting a directory symlink within a path it already has permissions for.

Vulnerability Details

The FileChooserImpl::EnumerateChosenDirectory method allows a renderer to request an enumeration of a directory. Before proceeding, it checks if the renderer has permission to read the directory using ChildProcessSecurityPolicyImpl::CanReadFile. If the user has previously granted access to a parent directory (e.g., via a drag-and-drop of a folder), this check will pass even if the requested subdirectory is a symbolic link. This is because CanReadFile performs a purely lexical path-based prefix check without resolving symlinks on disk.

Once the enumeration completes (which successfully follows the symlink), the results are processed by RemoveSymlinks to filter out any files that are symlinks or are located within a directory symlink. The implementation is as follows:

C++
// Removes any file that is a symlink or is inside a directory symlink.
// For |kUploadFolder| mode only. |base_dir| is the folder being uploaded.
std::vector<blink::mojom::FileChooserFileInfoPtr> RemoveSymlinks(
    std::vector<blink::mojom::FileChooserFileInfoPtr> files,
    base::FilePath base_dir) {
  DCHECK(!base_dir.empty());
  auto to_remove = std::ranges::remove_if(
      files,
      [&base_dir](const base::FilePath& file_path) {
        if (base::IsLink(file_path))
          return true;
        for (base::FilePath path = file_path.DirName(); base_dir.IsParent(path);
             path = path.DirName()) {
          if (base::IsLink(path))
            return true;
        }
        return false;
      },
      [](const auto& file) { return file->get_native_file()->file_path; });
  files.erase(to_remove.begin(), to_remove.end());
  return files;
}

The issue lies in the loop condition base_dir.IsParent(path). According to the implementation of base::FilePath::IsParent, a path is not its own parent; it returns false if the two paths are equal.

Consequently, when RemoveSymlinks processes a file directly inside the base_dir (e.g., base_dir/file.txt), path is initialized to base_dir. The loop condition base_dir.IsParent(base_dir) immediately evaluates to false, and the loop terminates without ever checking if base_dir itself is a symbolic link via base::IsLink(path).

If the base_dir is a symlink, the files within it are not filtered out, and the browser proceeds to call GrantReadFile on the renderer process for the resulting paths, effectively granting access to files outside the intended scope.

Potential Attack Scenario

Note: These are potential steps, as we do not yet have the ability to run code to confirm the exploit.

  1. Victim Interaction: The user is tricked into dropping a directory (let's call it D) onto an attacker-controlled webpage (e.g., onto an <input type="file" webkitdirectory> element).
  2. Attacker Preparation: Unknown to the user, the directory D contains a symbolic link named link that points to a sensitive local directory outside of D (e.g., D/link points to /etc/ or a user's home directory).
  3. Initial Permission Grant: When the user drops the directory, the browser process grants the renderer process read access to the entire directory D.
  4. Renderer Compromise: The attacker compromises the renderer process, gaining the ability to execute arbitrary code within the sandbox.
  5. Malicious Invocation: The compromised renderer binds the blink.mojom.FileChooser Mojo interface and calls EnumerateChosenDirectory("D/link").
  6. Permission Check: The browser verifies permission for D/link. This passes because it lexically falls under the existing grant for D.
  7. Enumeration: The browser recursively enumerates the contents of D/link, following the symlink to the target directory (e.g., /etc/).
  8. Filter Bypass: RemoveSymlinks processes the enumerated files (e.g., D/link/passwd). Due to the IsParent bug, it fails to detect that D/link is a symlink.
  9. Privilege Escalation: The browser explicitly grants the renderer permission to read the enumerated files (e.g., D/link/passwd).
  10. Arbitrary File Read: The renderer can now read the contents of sensitive files via standard file APIs or Mojo interfaces, achieving a sandbox escape.

Suggested Fix

The loop in RemoveSymlinks should be modified to also check base_dir for being a link, or the iteration logic should be adjusted. For example:

C++
        for (base::FilePath path = file_path.DirName(); ;
             path = path.DirName()) {
          if (base::IsLink(path))
            return true;
          if (path == base_dir) // Reached the top, stop here after checking base_dir
            break;
        }

Alternatively, IsParent could be replaced with base_dir == path || base_dir.IsParent(path) in the loop condition.

Evaluated with Chrome root at commit: 876d480da1f794d87813cfa2e6ff4fcf9771e939


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

The loop condition `base_dir.IsParent(path)` returns false when `path` equals `base_dir`, so the base directory itself is never checked for being a symlink.

Impact

A compromised renderer could gain read access to arbitrary local files, potentially escaping the sandbox, though the report notes the exploit has not been confirmed.

What the attacker needed

Victim drops a directory onto a webpage; attacker compromises the renderer; directory contains a symlink

The fix

The loop in RemoveSymlinks should be modified to also check base_dir for being a link, or the iteration logic should be adjusted.

How it was found

  1. The user is tricked into dropping a directory onto an attacker-controlled webpage.
  2. The dropped directory contains a symbolic link pointing to a sensitive local directory.
  3. The browser grants the renderer read access to the dropped directory.
  4. The attacker compromises the renderer process.
  5. The compromised renderer calls EnumerateChosenDirectory on the symbolic link.
  6. The browser enumerates the symlink target and grants read access to the files, bypassing the symlink filter.

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 (symlink) is a shortcut that points to another file or folder. The browser tries to block access to symlinks when listing a folder, but it forgets to check if the folder being listed is itself a symlink. This could let a malicious program inside the browser read files it should not be able to see.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.