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

Incorrect authorization in FileSystem (CVE-2026-84354)

The File System Access API allowed a site with write access to a file in the user's home directory to rename it to a shell initialisation dotfile such as .zshenv, because leading dots were stripped during path validation and home directory files were generally allowed. An attacker could trick a user into saving a file to their home directory, then rename it to a dotfile and achieve persistent remote code execution when the user opened a terminal.

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: The File System Access API allows a site with write access to a file in the user's home directory to rename it to a shell initialization dotfile like .zshenv. This bypasses security checks because leading dots are stripped during path validation, and files in the home directory are generally allowed. By tricking a user into saving a file to their home directory, an attacker can rename it to a dotfile and achieve persistent RCE when the user opens a terminal.

Affected files:

  • content/browser/file_system_access/file_system_access_handle_base.cc
  • chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
  • content/browser/file_system_access/file_system_access_manager_impl.cc
  • third_party/blink/renderer/modules/file_system_access/file_system_file_handle.cc
  • third_party/blink/renderer/modules/file_system_access/file_system_file_handle.idl

Estimated timestamp from git blame: 2025-07-03

Vulnerability Details

The File System Access API's move() method allows a website to rename a file to a sibling name within the same directory. If a user is socially engineered into saving a file in their home directory (e.g., ~/innocent.txt), the attacker obtains a FileSystemFileHandle with explicit write access to that file.

The attacker can then write a malicious shell payload to the file and wait for a transient user activation (such as a click). Upon activation, the site can call handle.move(".zshenv") (on macOS) or handle.move(".bash_aliases") (on Linux).

This rename operation systematically bypasses several critical security checks in the browser process:

  1. User Activation Gate Bypass: FileSystemAccessHandleBase::DoRename permits the move without explicit write access to the destination if has_transient_user_activation is true.
  2. Safe Path Component Check: FileSystemAccessManagerImpl::IsSafePathComponent strips leading dots before checking filename legality. It treats the entire filename (e.g., .zshenv) as the extension, strips the dot, and checks zshenv against Safe Browsing policies. Since zshenv is not explicitly listed as dangerous in download_file_types.asciipb, it defaults to NOT_DANGEROUS and passes the check.
  3. Blocklist Check: ChromeFileSystemAccessPermissionContext::GenerateBlockPaths explicitly marks the home directory (base::DIR_HOME) with BlockType::kDontBlockChildren. While sensitive subdirectories like ~/.ssh and ~/.config are blocked, individual sibling files in the home directory are implicitly allowed.
  4. Overwrite Check: As long as the destination file (e.g., ~/.zshenv) does not already exist, the move proceeds silently without prompting the user.

Once the file is renamed, the next time the user opens a terminal, their shell (e.g., zsh on macOS) will source the malicious dotfile, resulting in Remote Code Execution outside the Chrome sandbox.

Potential Reproduction Steps

Note: These are suggested steps based on code analysis; a working proof of concept has not yet been executed by our tooling.

  1. An attacker sets up a malicious website and tricks the user into saving a file using window.showSaveFilePicker(). The user is instructed to save the file in their home directory (~) as innocent.txt.
  2. The website writes a shell command payload (e.g., touch /tmp/rce) to the file via createWritable().
  3. The site waits for the user to interact with the page again (e.g., a "Complete Download" button) to gain transient user activation.
  4. The site calls handle.move(".zshenv") (macOS) or handle.move(".bash_aliases") (Linux).
  5. The browser renames the file on disk to the target shell initialization file.
  6. The user opens a new terminal session, which automatically sources the malicious file and executes the payload.

Suggested Fix

  1. Block Shell Dotfiles: Update ChromeFileSystemAccessPermissionContext::GenerateBlockPaths to explicitly block known shell initialization files (e.g., .bashrc, .bash_profile, .zshenv, .zshrc, .profile, .bash_aliases) in the home directory, similar to how .ssh and .gnupg are blocked.
  2. Update Safe Browsing Policies: Add these shell configuration file extensions to download_file_types.asciipb as DANGEROUS to ensure they are caught by IsFileTypeDangerous during rename operations.
  3. Re-evaluate Dotfile Handling: Reconsider whether FileSystemAccessManagerImpl::IsSafePathComponent should allow renaming to arbitrary dotfiles, or if it should more strictly restrict which dotfiles can be created via the API.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


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 path validation stripped leading dots before checking filenames, so dotfiles were treated as harmless extensions, and the home directory was not blocked for individual files.

Impact

An attacker could achieve persistent remote code execution outside the Chrome sandbox when the user opens a terminal, but the report notes that a working proof of concept has not yet been executed.

What the attacker needed

Victim saves a file to home directory; victim interacts with the page again; destination dotfile does not already exist

The fix

The report suggests blocking shell dotfiles in the home directory, adding them to Safe Browsing policies as dangerous, and re-evaluating dotfile handling in path validation.

How it was found

  1. An attacker sets up a malicious website and tricks the user into saving a file using window.showSaveFilePicker() in their home directory as innocent.txt.
  2. The website writes a shell command payload to the file via createWritable().
  3. The site waits for the user to interact with the page again to gain transient user activation.
  4. The site calls handle.move(".zshenv") on macOS or handle.move(".bash_aliases") on Linux.
  5. The browser renames the file on disk to the target shell initialization file.
  6. The user opens a new terminal session, which automatically sources the malicious file and executes the payload.

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.

The browser has a feature that lets websites save and rename files, but it is supposed to stop you from creating dangerous files. Here, a website could rename an ordinary file you saved into a special startup file that your terminal runs automatically. If you later opened a terminal, the attacker's commands would run on your computer.

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.