Inappropriate implementation in UI (CVE-2026-13992)
A logic flaw in macOS keyboard event redispatching lets a malicious site auto-confirm native system dialogs such as file pickers. By delaying the input acknowledgment, an attacker can have a redispatched Enter key delivered to a dialog that has just gained focus, bypassing user consent for sensitive actions like file system access.
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: A logic flaw in the macOS keyboard event redispatching mechanism allows a malicious website to potentially auto-confirm native system dialogs. By delaying input acknowledgment, an attacker can ensure a redispatched 'Enter' key is delivered to a native panel after it gains focus. This bypasses user consent requirements for sensitive actions like file system access.
Affected files:
ui/base/cocoa/command_dispatcher.mmchrome/browser/ui/views/frame/browser_native_widget_mac.mmcontent/browser/renderer_host/render_widget_host_impl.cccomponents/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
There is a potential logic flaw in how keyboard events are redispatched on macOS when they are left unhandled by a renderer. An attacker could exploit this to automatically confirm native system dialogs (e.g., NSSavePanel or NSOpenPanel) without explicit user intent. This specifically impacts security-sensitive APIs that rely on native dialogs for user consent, such as the File System Access API.
Technical Details
On macOS, Chromium uses a redispatch mechanism to allow the system to perform default actions for keyboard events that the renderer chooses not to handle. This logic resides in ui/base/cocoa/command_dispatcher.mm. When an input acknowledgment (ack) is received indicating the event was unhandled, [CommandDispatcher redispatchKeyEvent:] is called, which re-injects the original NSEvent via [NSApp sendEvent:event].
According to macOS AppKit behavior, [NSApplication sendEvent:] redirects KeyDown events to the current keyWindow if the event's associated window is not focused. When a native dialog like NSSavePanel is opened (e.g., via window.showSaveFilePicker()), it immediately becomes the keyWindow for the application.
If the renderer delays the input ack (for example, by performing a synchronous busy loop in JavaScript immediately after calling the picker API), the browser will only attempt to redispatch the 'Enter' key after the native dialog is already visible and focused. AppKit will then deliver the 'Enter' event directly to the dialog, which interprets it as a user confirmation (clicking the default "Save" or "Open" button).
Existing protections in Chrome, such as the isEventBeingRedispatched: check, are only implemented in Chrome's custom NativeWidgetMacNSWindow subclasses. Native system panels do not inherit from these classes and therefore do not benefit from these safeguards. Consequently, they treat the redispatched event as fresh user input.
Potential Attack Steps
- A user interacts with a malicious site and presses the 'Enter' key.
- The site's
keydownlistener triggers a native dialog, such aswindow.showSaveFilePicker(). - The JavaScript execution continues and performs a synchronous delay (e.g., a short
whileloop) before completing the event handler. - During this delay, the macOS native file picker appears and becomes the active
keyWindow. - Once the handler finishes and the 'unhandled' status is acked to the browser, the browser redispatches the 'Enter' key.
NSApplicationdelivers the redispatched 'Enter' to the focused native dialog.- The dialog confirms automatically, granting the site access to the file system at the suggested location.
Suggested Fix
The browser should verify that the window associated with the CommandDispatcher is still the keyWindow before proceeding with redispatchKeyEvent:. If the focus has shifted to a native panel or another window, the redispatch should be aborted to prevent accidental or malicious auto-confirmation. Additionally, implementing a short input lockout (similar to InputEventActivationProtector) for native macOS dialogs would provide a robust defense against such timing-based attacks.
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.
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 redispatch path does not check that the originating window is still the key window, so a redispatched key event is delivered to whatever native panel currently has focus.
Impact
A malicious site could auto-confirm a native file picker and gain file system access at the suggested location, though the report only claims this as a potential issue.
What the attacker needed
MacOS; victim presses Enter on a malicious page; site uses File System Access API
The fix
The browser should check that the dispatcher's window is still the key window before redispatching, and add a short input lockout for native macOS dialogs.
How it was found
- The user presses Enter while on a malicious site.
- The site's keydown handler opens a native file picker.
- The handler then runs a synchronous delay before returning.
- The native picker appears and becomes the key window during the delay.
- The browser receives the unhandled ack and redispatches the Enter key.
- The native dialog receives the Enter and confirms automatically.
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 press a key, the browser sometimes passes it to the web page first and, if the page ignores it, sends it back to the operating system to handle. This report says a website can stall that hand-back until a system dialog (like a save-file window) has opened, so the key press lands on the dialog and clicks its default button for you. That means a site could get you to approve something you never agreed to.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.