Skip to content
Business logic Advisory Advanced CVE-2026-13981

Inappropriate implementation in Chrome for iOS (CVE-2026-13981)

The ChooseFileTabHelper on iOS caches file-choosing metadata that is not cleared during cross-document navigations. An attacker can pre-seed this state to influence the native file picker behaviour on a victim origin, leading to potential UI spoofing or policy overrides.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 45 days

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: The ChooseFileTabHelper on iOS caches file-choosing metadata that is not cleared during cross-document navigations. An attacker can pre-seed this state to influence the native file picker behavior on a victim origin, leading to potential UI spoofing or policy overrides.

Affected files:

  • ios/chrome/browser/web/model/choose_file/choose_file_tab_helper.mm
  • ios/chrome/browser/web/model/choose_file/choose_file_java_script_feature.mm
  • ios/chrome/browser/web/model/choose_file/resources/choose_file.ts

Estimated timestamp from git blame: 2025-10-03

Vulnerability Summary

A potential logic vulnerability in ChooseFileTabHelper on iOS allows file-choosing metadata to persist across cross-document navigations. This state can be exploited by a malicious website to influence the parameters of a file picker subsequently triggered on a different origin.

Technical Details

When a user interacts with a file input on iOS Chrome (when the kIOSCustomFileUploadMenu feature is enabled), the ChooseFileJavaScriptFeature sends a ChooseFileHandler message from the page to the browser. This message contains metadata such as the capture attribute, accepted MIME types/extensions, and the screen location of the interaction. This metadata is stored in the last_choose_file_event_ member of the ChooseFileTabHelper class.

The ChooseFileTabHelper acts as a web::WebStateObserver and implements DidStartNavigation. However, its current implementation only clears the active ChooseFileController and does not reset the cached last_choose_file_event_ member:

C++
// ios/chrome/browser/web/model/choose_file/choose_file_tab_helper.mm

void ChooseFileTabHelper::DidStartNavigation(
    web::WebState* web_state,
    web::NavigationContext* navigation_context) {
  if (!navigation_context->IsSameDocument()) {
    AbortSelection(); // Resets the controller_, but leaves last_choose_file_event_ intact
  }
}

If a user navigates from an attacker-controlled page to a victim page, any metadata pre-seeded by the attacker remains in the tab helper's state. When a file picker is subsequently triggered on the victim page, the browser's RunOpenPanel method consumes this cached event. While RunOpenPanel overwrites some fields (like allowsMultipleSelection) using values from the native WKOpenPanelParameters, other sensitive fields like capture and accept types are not part of the native parameters and are thus used directly from the stale, attacker-provided event.

Potential Exploitation Path

An attacker could potentially trigger this vulnerability using the following suggested steps:

  1. The attacker's site sends a ChooseFileHandler message via JavaScript with malicious metadata (e.g., setting capture: 1 to force a direct camera launch) and then navigates the tab to a victim site (e.g., https://victim.example/upload).
  2. On the victim site, the user interacts with a file input in a way that bypasses the browser's JavaScript interception logic. This can occur if the input is within a Shadow DOM (where event retargeting prevents the browser's listener from identifying the target as an HTMLInputElement) or if the site uses the showPicker() API, which is not intercepted by the current prototype patches.
  3. The browser's RunOpenPanel retrieves the stale metadata from the attacker's origin and uses it to configure the native file picker on the victim's origin.
  4. The native UI behavior is driven by the attacker's values, potentially resulting in the camera opening directly or restricted file types being displayed without the victim origin's consent.

Suggested Fix

The DidStartNavigation method in ChooseFileTabHelper should be updated to clear the last_choose_file_event_ whenever a cross-document navigation occurs. This ensures that metadata from a previous origin cannot influence the file picker on a new origin.

C++
void ChooseFileTabHelper::DidStartNavigation(
    web::WebState* web_state,
    web::NavigationContext* navigation_context) {
  if (!navigation_context->IsSameDocument()) {
    AbortSelection();
    ResetLastChooseFileEvent(); // Suggested addition to clear the cached event
  }
}

Note: These findings are based on manual code analysis; a functional proof-of-concept has not been executed.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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 DidStartNavigation method only aborts the active file selection controller but does not reset the cached last_choose_file_event_ member, so metadata from a previous origin persists across cross-document navigations.

Impact

The native file picker on a victim origin could be influenced by attacker-controlled metadata, potentially causing the camera to open directly or restricting displayed file types without the victim origin's consent; however, the report notes that a functional proof-of-concept has not been executed.

What the attacker needed

KIOSCustomFileUploadMenu feature enabled; victim navigates from attacker site to victim site; victim interacts with a file input on victim site; interaction bypasses JS interception (Shadow DOM or…

The fix

The DidStartNavigation method should be updated to clear the last_choose_file_event_ whenever a cross-document navigation occurs.

How it was found

  1. The attacker's site sends a ChooseFileHandler message via JavaScript with malicious metadata and then navigates the tab to a victim site.
  2. On the victim site, the user interacts with a file input in a way that bypasses the browser's JavaScript interception logic, such as via Shadow DOM or the showPicker() API.
  3. The browser's RunOpenPanel retrieves the stale metadata from the attacker's origin and uses it to configure the native file picker on the victim's origin.
  4. The native UI behaviour is driven by the attacker's values, potentially resulting in the camera opening directly or restricted file types being displayed without the victim origin's consent.

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.

When you pick a file on a website, the browser remembers some details about that request, such as whether to open the camera or which file types are allowed. This report says that on Chrome for iOS, those details are not cleared when you move to a different website. A malicious site could set them up so that when you later try to upload a file on another site, the file picker behaves in a way that site did not intend.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.