Insufficient validation of untrusted input in WebAppInstalls (CVE-2026-14122)
The PWA installation code on Windows does not reject reserved device names such as COM1 or PRN when turning a web app's name into a filename. An attacker could use a malicious manifest to make the browser write shortcut or icon data to a serial device, or hang background threads by reading from a blocking device.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 46 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 PWA installation process on Windows fails to sanitize reserved device names (e.g., COM1, PRN) in the web app name. This allows an attacker to potentially perform unauthorized hardware I/O or cause a denial of service in the browser process.
Affected files:
chrome/browser/web_applications/os_integration/web_app_shortcut_win.cc
Estimated timestamp from git blame: 2012-02-11
Summary
The PWA shortcut and icon creation logic on Windows does not check for reserved device names when converting a web app manifest's name into a filename. While it strips illegal characters (like * or ?), it fails to reject or transform names such as CON, PRN, AUX, NUL, COM1-9, and LPT1-9. This can be leveraged by a malicious website to interact with hardware devices via the browser process or cause a persistent denial of service (DoS) by hanging background worker threads.
Root Cause Analysis
The issue is located in the GetSanitizedFileName function within chrome/browser/web_applications/os_integration/web_app_shortcut_win.cc.
// chrome/browser/web_applications/os_integration/web_app_shortcut_win.cc:654
base::FilePath GetSanitizedFileName(const std::u16string& name) {
std::wstring file_name = base::AsWString(name);
base::i18n::ReplaceIllegalCharactersInPath(&file_name, ' ');
return base::FilePath(file_name);
}
The call to base::i18n::ReplaceIllegalCharactersInPath removes common illegal characters but does not account for reserved names. Other components in the PWA subsystem correctly use net::IsReservedNameOnWindows to mitigate this risk (e.g., in chrome/browser/web_applications/os_integration/web_app_handler_registration_utils_win.cc), but this check is missing from the primary shortcut and icon generation paths.
Potential Impact
- Unauthorized Device I/O: During PWA installation, the browser attempts to create a shortcut (e.g.,
Desktop\COM1.lnk). Due to legacy Windows path normalization, writing toCOM1.lnkredirects the binary data of the shortcut to theCOM1serial port. An attacker can control the manifest'sdescriptionfield, which is embedded in the shortcut file, potentially allowing them to send arbitrary commands to a serial device (e.g., a printer or industrial controller) without the user's consent, bypassing WebSerial permissions. - ThreadPool Denial of Service: The browser also manages icon files (e.g.,
COM1.ico) and their associated checksums (e.g.,COM1.ico.md5). During icon update checks, the browser callsbase::ReadFileon the checksum file. IfCOM1refers to a blocking serial device, the::ReadFilecall on the backgroundThreadPoolworker thread will hang indefinitely. Repeated triggers can exhaust the browser's thread pool, leading to a complete hang of background tasks.
Suggested Potential Steps to Reproduce
- On a Windows 10 system, host a web manifest where the
"name"field is set to a reserved name like"COM1"and the"description"field contains a payload. - In Chrome, navigate to the site and install the PWA.
- Observe that the browser process attempts to create a file at
Desktop\COM1.lnk. If a serial listener is active onCOM1, it may receive binary data during the installation. - Trigger a PWA update or icon refresh. Observe the browser's background thread pool for worker threads hanging in a
base::ReadFileoperation on theCOM1.ico.md5file.
Recommended Fix
Update GetSanitizedFileName in chrome/browser/web_applications/os_integration/web_app_shortcut_win.cc to include a check for reserved names using net::IsReservedNameOnWindows. If a reserved name is detected, it should be transformed (e.g., by prepending an underscore) to ensure it is treated as a regular file rather than a device handle.
Note: These findings are based on code analysis; our tooling does not currently have the capability to execute code or provide a working proof-of-concept.
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 filename sanitisation function removes illegal characters but does not check for Windows reserved device names, unlike other parts of the same subsystem.
Impact
An attacker could potentially send data to a serial device without consent, bypassing WebSerial permissions, or cause a persistent denial of service by exhausting the browser's thread pool; the report notes these findings are from code analysis without a working proof-of-concept.
What the attacker needed
Windows 10 system; victim installs a malicious PWA; a serial device on the reserved port for I/O impact
The fix
The function should check for reserved names using the existing Windows reserved-name helper and transform any match, for example by prepending an underscore.
How it was found
- Host a web manifest whose name is a reserved device name and whose description contains a payload.
- Install the PWA in Chrome on Windows.
- Observe the browser trying to create a shortcut file named after the reserved device.
- Trigger an icon refresh and observe background threads hanging on a read of the checksum file.
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.
Windows treats certain names like COM1 and PRN as special device handles rather than ordinary files. If a program creates a file with one of those names, Windows may send the data to a hardware port instead. Here, a website's app name is used directly as a filename, so a malicious site could make the browser talk to a device or freeze its background work.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.