Inappropriate implementation in File Input (CVE-2026-17744)
Chromium's GTK3 file chooser on Linux parses selected image files with the memory-unsafe gdk-pixbuf library inside the unsandboxed browser process. A malicious webpage could download a crafted image and prompt the user to select it, potentially leading to memory corruption and a sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 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: Chromium's Linux GTK3 file chooser explicitly enables image previews, parsing selected files directly in the unsandboxed browser process using the gdk-pixbuf C library. This violates the Rule of 2 by handling untrusted input with a memory-unsafe library in a privileged process. A malicious webpage could exploit this by downloading a crafted image and prompting the user to select it, potentially leading to a sandbox escape and Remote Code Execution.
Affected files:
ui/gtk/select_file_dialog_linux_gtk.ccui/gtk/gtk_compat.cc
Estimated timestamp from git blame: 2023-09-29
Description
There is a potential sandbox escape vulnerability in Chromium's GTK3 file chooser implementation on Linux. In ui/gtk/select_file_dialog_linux_gtk.cc, the SelectFileDialogLinuxGtk::OnUpdatePreview callback explicitly generates image previews by calling the gdk-pixbuf C library directly within the unsandboxed browser process.
Specifically, when a user highlights a file, the code calls gdk_pixbuf_new_from_file_at_size(). The gdk-pixbuf library is a complex, memory-unsafe image parser with a history of heap corruption vulnerabilities. Processing untrusted, potentially attacker-controlled files with it in the browser process is a direct violation of Chromium's "Rule of 2" security architecture.
Potential Attack Scenario
Although we do not currently have a working proof of concept that has been successfully run, an attacker could potentially trigger this vulnerability through the following steps:
- Payload Delivery: A malicious webpage triggers a drive-by download of a crafted image payload (e.g., a malformed
.anior.giffile designed to exploit agdk-pixbufparser bug) into the user's default~/Downloadsdirectory. - Trigger Dialog: The webpage calls a file selection API such as
window.showOpenFilePicker({startIn: 'downloads'})following a user gesture. - User Interaction: On Linux systems using the GTK3 fallback dialog, the file chooser opens directly in the downloads folder. The user highlights the malicious file (e.g., by single-clicking it or using arrow keys).
- Unsandboxed Parsing: The GTK
update-previewsignal fires, causing the browser process to executegdk_pixbuf_new_from_file_at_size()on the payload. - Exploitation: The parsing triggers a memory corruption vulnerability within
gdk-pixbufor itsgliballocator, leading to Remote Code Execution (RCE) and a full sandbox escape. MiraclePtr provides no mitigation here, as the allocations occur entirely outside of Chromium's PartitionAlloc.
Suggested Fix
To comply with the Rule of 2, remove the custom preview widget implementation from the GTK3 fallback dialog entirely (this is already the default behavior for GTK4).
If image previews are strictly required for product reasons, the file path should be sent to the sandboxed DataDecoder utility process. The utility process can safely parse the untrusted image and return a decoded bitmap to the browser process over IPC.
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
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.
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
The GTK3 file chooser calls the memory-unsafe gdk-pixbuf image parser directly in the unsandboxed browser process, violating Chromium's Rule of 2.
Impact
A crafted image could cause memory corruption in the browser process, potentially leading to remote code execution and a full sandbox escape; the report notes no working proof of concept exists yet.
What the attacker needed
Linux with GTK3 fallback dialog; victim downloads a crafted image; victim highlights the file in the dialog
The fix
The custom preview widget should be removed from the GTK3 fallback dialog, or previews should be parsed in the sandboxed DataDecoder utility process.
How it was found
- A malicious webpage triggers a download of a crafted image into the Downloads folder.
- The webpage calls a file selection API after a user gesture.
- The GTK3 file chooser opens in the Downloads folder and the user highlights the malicious file.
- The GTK update-preview signal fires and the browser process parses the file with gdk-pixbuf.
- Memory corruption in gdk-pixbuf or glib could lead to code execution and sandbox escape.
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 in a file-open dialog, the browser may try to show a small preview of the image. On Linux with the GTK3 dialog, Chromium does this preview work in the main browser program, which has full access to your computer, using an image-reading library that has had memory bugs before. If that library can be tricked by a bad image, an attacker could break out of the browser's protective sandbox.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.