Skip to content
Info disclosure Advisory Advanced CVE-2026-2320

Inappropriate implementation in File input (CVE-2026-2320)

A compromised renderer could use a save file picker with a prefilled filename to obtain read access to local files, including files that do not yet exist. An attacker could then read downloaded files or existing files with minimal user interaction.

Alesandro Ortiz Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 6 months

SUMMARY

A compromised renderer can use a file picker dialog with kSave mode and prefilled filename to read local files. In ideal scenarios, this occurs with minimal user interaction (holding enter) and can be used to read one or multiple files.

This is similar to issue 433800617 that I reported and fixed recently. See that issue for more context on some of the details I mention below.

VULNERABILITY DETAILS

When a user clicks a file-type input, the renderer calls FileChooser::OpenFileChooser() with a FileChooserParams::Mode to open file picker dialogs. In most cases, open file pickers are restricted by the browser from having a prefilled filename to prevent reading files without additional confirmation.

A compromised renderer can read files while bypassing the prefilled filename restrictions. When using Mode::kSave instead of Mode::kOpen, the renderer can set default_file_name which prefills the filename.

When the user clicks the "Save" button, the page gets read access to the file path. No file is created or written at the path, but we can read any current or future file at that path. When targeting a non-existent file, the attacker needs to know/predict the target filename, but this is easily predictable in many cases such as downloads.

There's two ways an attacker can use this dialog:

  • Selecting non-existent file: Even when a file does not yet exist, the renderer gets a file handle when the user clicks "Save". After selection, when something else creates a file in the same selected location, the renderer can read the file without further user interaction. For example, a file can be created through browser downloads or external processes.
  • Selecting existing file: For existing files, Windows will show an overwrite confirmation prompt. If the user accepts, the file is not actually overwritten and the renderer can read the file. This has same impacts as issue 433800617, with the only user flow differences being the overwrite confirmation prompt and the "Save" button instead of "Open" button.

Last selected directory behavior

As mentioned in issue 433800617, the file picker dialog for file-type inputs will show the last_selected_directory which may not be the target folder. If the user needs to select the target folder, this increases user interaction and prevents the happy path from occuring for the first targeted file. However, for any subsequent targeted files in the same folder, the happy path can be used.

This is less of a mitigation here compared to issue 433800617 because this attack asks users to save a file which doesn't exist, instead of opening an existing file. Even when the user has to manually change folders, the user isn't aware they are providing read access to any future file at that path.

For example, if an attacker wants to read future files from the downloads folder:

  • In the happy path (if it's the downloads folder): The attacker can easily read one or more future downloads with minimal interaction (holding enter).
  • In the sad path (if it's another folder): The attacker can ask the user to "Save" the file in the Downloads folder, which alllows attacker to read one future download. Any subsequent attempts can use the happy path (hold enter) to read multiple files.

Chained impact: Cross-site downloads

When chained with issue 428189828 to perform cross-site downloads, we can read the cross-site downloads with minimal user interaction (holding enter).

AFAICT, Mode::kSave was used by the PPAPI in the past and isn't currently used by the renderer through OpenFileChooser().

Chained impact: Arbitrary local file reads

There's a vulnerability that can be chained to achieve arbitrary local file reads, but I haven't submitted that report yet. I'll provide the chained PoC in comments once report is submitted.

Potential impact: File write to potentially bypass Safe Browsing + MOTW

Notably, using Mode::kSave in FileChooserImpl::FileSelected() calls CPSPI::GrantCreateReadWriteFile() which means the renderer could in theory ask the browser to write to the selected file path in the future. However, I have not found a way to do so since AFAICT the renderer needs to make writes through the browser process, and the the only way a renderer can ask the browser process to write files is through the FSA API. But if there's a way to write to this file, and if those paths don't use Safe Browsing or set MOTW, this would be a bypass of one or both security features.

If you, reader, know how to write to a file if we have a path from OpenFileChooser(), please comment below. :)

PROPOSED FIX

AFAICT, Mode::kSave was used by the PPAPI in the past and isn't currently used by the renderer through FileChooser::OpenFileChooser(). Therefore, blocking Mode::kSave in FileChooser::OpenFileChooser() should fix the issue without affecting any other uses of save dialogs that don't go through the renderer. But I'll need to verify this once I implement the fix.

VERSION

Chrome version:

  • Cross-site credentialed download: 138.0.7204.169 Stable, 140.0.7326.0 Canary
  • Show kSave file picker with prefilled filename: Verified with custom build based on aad34245b04df3c637ce7c51b5a10af879e1ac98 (July 3rd)

Operating System: Windows 10

REPRODUCTION CASE

Patch to simulate compromised renderer To simulate a compromised renderer, the patch:

  • Updates third_party/blink/renderer/core/html/html_marquee_element.cc to call NotifyUserActivation() when marqueeElem.stop() is called in JS, to bypass user activation checks.
  • Updates third_party/blink/renderer/core/html/forms/file_input_type.cc to call DownloadURL() directly and set default_file_name in open file picker. See patch for how to use attributes to change behavior.

Setup for PoCs:

  • If self-hosting or want to edit using DevTools, optionally configure the target URL in the source code (e.g. https://myaccount.google.com/personal-info).
  • If using default target (such as on hosted PoC), navigate to https://aogarantiza.com/set-cookies.php to set cookies on target.
  • Apply attached patch and build Chromium.

Scenario 1a: Non-existent file (hold enter) + chained with cross-site download

Using patched browser:

  1. Navigate to https://alesandroortiz.com/security/chromium/download-theft-input-ksave-cr.html?mode=holdenter
  2. Press and hold enter.
  • For happy path (shows downloads folder): Wait for attack to complete within a couple of seconds.
  • For sad path (non-downloads folder case): When prompted again, select downloads folder, then click "Save" button.

Observed: Page can show save dialog with prefilled filename. When user clicks/presses "Save" for non-existent file, page gets file handle for specified path. When page performs cross-site download to the same path, page can read download.

Expected: Page cannot show save dialog with prefilled filename. When user clicks/presses "Save", page does not get file handle for specified path. When page performs cross-site download to the same path, page cannot read download.

Scenario 1b: Non-existent file (normal dialog interaction) + chained with cross-site download

Using patched browser:

  1. Navigate to https://alesandroortiz.com/security/chromium/download-theft-input-ksave-cr.html
  2. Click anywhere. (Note: a compromised renderer can show the dialog without user interaction.)
  • For happy path (shows downloads folder): Click "Save" button.
  • For sad path (non-downloads folder case): Select downloads folder, then click "Save" button.
  1. Wait for attack to complete within a couple of seconds.

Observed/Expected: Same as Scenario 1a.

Scenario 2: Existing file (normal dialog interaction)

Note: Ignore PoC's built-in instructions.

Using patched browser:

  1. Navigate to https://alesandroortiz.com/security/chromium/download-theft-input-ksave-cr.html
  2. Click anywhere. (Note: a compromised renderer can show the dialog without user interaction.)
  3. Click any existing file in the folder.
  4. Click "Yes" in overwrite confirmation prompt.

Observed: When user clicks "Save", page can read existing file without further warnings.

Expected: When user clicks "Save", page cannot read existing file without further warnings.

Credit Information

Reporter credit: Alesandro Ortiz https://AlesandroOrtiz.com

The original report as published on the Chromium issue tracker, by Alesandro Ortiz. 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

Impact

A compromised renderer could read local files, including future downloads, with minimal user interaction; on Windows, reading an existing file required accepting an overwrite confirmation prompt.

What the attacker needed

Compromised renderer; user interacts with save dialog; Windows for existing file overwrite prompt

The fix

The report proposes blocking `Mode::kSave` in `FileChooser::OpenFileChooser()` to prevent the renderer from using save dialogs with prefilled filenames.

How it was found

  1. Navigate to the proof-of-concept page in a patched browser.
  2. Press and hold enter, or click to trigger the save dialog.
  3. If the downloads folder is not shown, select it and click Save.
  4. Wait for the attack to complete and the page to read the downloaded 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 web page normally cannot read files on your computer without you choosing them. This bug let a malicious page trick the save dialog into giving it access to a file path, so it could later read whatever file appeared there, such as a download.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Alesandro Ortiz

View all

33 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.