Incorrect reference resolution in Browser (CVE-2026-106274)
On macOS, Chrome automatically zips file packages selected via a file picker, but the zipping process follows symbolic links without validation. An attacker could craft a malicious package containing symlinks to sensitive local files, and when a victim selects it, Chrome would include those files in the resulting zip, allowing the attacker to exfiltrate them.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 6 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: On macOS, when a user selects a file package (e.g., a .app bundle) in a standard file picker, Chrome automatically zips the package. The zipping process inadvertently follows symlinks without validation, potentially allowing a malicious bundle to exfiltrate arbitrary local files when uploaded.
Affected files:
chrome/browser/file_select_helper_mac.mmcomponents/remote_cocoa/app_shim/select_file_dialog_bridge.mmcontent/browser/web_contents/file_chooser_impl.ccthird_party/zlib/google/zip.cc
Estimated timestamp from git blame: 2014-10-10
Summary
On macOS, Chrome automatically zips file packages (such as .app bundles) when they are selected via a file picker in kOpen or kOpenMultiple mode. This process, handled by FileSelectHelper::ProcessSelectedFilesMac, fails to properly handle symlinks. An attacker can craft a malicious package containing symlinks to sensitive local files (like SSH keys). When a victim selects this package, Chrome recursively zips the targets of these symlinks, bypassing existing mitigations and allowing the attacker to exfiltrate arbitrary local files at the browser process's privilege level.
Vulnerability Details
The vulnerability exists because the package-zipping pipeline on macOS follows symlinks during both directory enumeration and file reading:
- Symlink Following during Enumeration: When a package is selected,
FileSelectHelper::ZipPackagecallsRelativePathsForPackage(inchrome/browser/file_select_helper_mac.mm) to get a list of its contents. This function constructs abase::FileEnumeratorwithrecursive=truebut without thebase::FileEnumerator::SHOW_SYM_LINKSflag. On POSIX systems, omitting this flag causes the enumerator to usestat()instead oflstat(). Consequently, it follows symlinks to directories and recursively enumerates their contents as if they were inside the package. - Lexical Relativization: The enumerated paths are relativized using
base::FilePath::AppendRelativePath. This operation is purely lexical and does not resolve symlinks, blindly accepting paths likeEvil.app/Contents/loot_ssh/id_rsaas valid relative paths. - Symlink Following during Zip I/O: The resulting list of paths is passed to
zip::ZipFiles(inthird_party/zlib/google/zip.cc). This function opens files usingbase::FilewithFLAG_OPEN | FLAG_READ. On POSIX,base::Filetranslates this to theopen()system call without theO_NOFOLLOWflag. Therefore, the kernel follows the symlinks again, and the actual contents of the target files (e.g.,~/.ssh/id_rsa) are read into the zip archive. - Mitigation Bypass: The existing
RemoveSymlinksmitigation inFileChooserImpl::FileSelectedis skipped for standard file selection (kOpenandkOpenMultiple); it is only enforced forkUploadFolder. Furthermore, becauseProcessSelectedFilesMacreplaces the original package path with the path to the temporary.zipfile (which is a regular file), any subsequent symlink checks on the resulting path would be ineffective. - Package Selection: The macOS UI bridge in
components/remote_cocoa/app_shim/select_file_dialog_bridge.mmexplicitly permits the selection of file packages even when directory selection is disabled (canChooseDirectories = NO), facilitating this attack via standard<input type="file">elements.
Potential Reproduction Steps
Note: These steps describe how an attacker might exploit this issue. Our tooling agent cannot run code to verify this PoC end-to-end, but code analysis confirms the behavior.
- Create a directory named
Evil.app/with a minimalContents/Info.plistso macOS recognizes it as a package. - Inside
Evil.app/Contents/, create symlinks to sensitive user data, e.g.,ln -s ~/.ssh loot_ssh. - Package
Evil.appin a.dmgor.zipfile to preserve the symlinks upon download and extraction by a victim. - Social-engineer a user to visit a malicious site with an
<input type="file">element and select theEvil.appbundle. - Chrome's browser process will recursively zip the bundle, following the symlinks and including the contents of the target files (e.g., SSH private keys) in the archive.
- The browser process grants the renderer read access to the resulting zip file, which the attacker's JavaScript can then read and exfiltrate to a remote server.
Suggested Fix
- Enumerate symlinks without following them: In
chrome/browser/file_select_helper_mac.mm, updateRelativePathsForPackageto instantiatebase::FileEnumeratorwith thebase::FileEnumerator::SHOW_SYM_LINKSflag. This will ensure it useslstat()and does not traverse into directory symlinks. - Filter symlinks during zipping: Either manually filter out symlinks returned by the enumerator in
RelativePathsForPackage, or add logic tozip::ZipFiles(or a dedicated wrapper) to explicitly reject symlinks or useO_NOFOLLOWwhen opening files for zipping in this context. - Apply
RemoveSymlinksvalidation: Consider moving or duplicating theRemoveSymlinksvalidation logic so that it applies to the contents of Mac packages before they are zipped, ensuring consistency with the folder upload mitigations.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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
Likely, the package-zipping code on macOS follows symbolic links during both directory enumeration and file reading because it does not use the appropriate flags to avoid following symlinks.
Impact
An attacker could exfiltrate arbitrary local files at the browser process's privilege level, but the report notes that the tooling agent could not verify the proof-of-concept end-to-end.
What the attacker needed
MacOS; victim selects malicious package; attacker can deliver malicious package
The fix
The fix should involve enumerating symlinks without following them, filtering symlinks during zipping, and applying RemoveSymlinks validation to Mac packages before zipping.
How it was found
- Create a directory named Evil.app/ with a minimal Contents/Info.plist so macOS recognizes it as a package.
- Inside Evil.app/Contents/, create symlinks to sensitive user data, e.g., ln -s ~/.ssh loot_ssh.
- Package Evil.app in a .dmg or .zip file to preserve the symlinks upon download and extraction by a victim.
- Social-engineer a user to visit a malicious site with an <input type="file"> element and select the Evil.app bundle.
- Chrome's browser process will recursively zip the bundle, following the symlinks and including the contents of the target files (e.g., SSH private keys) in the archive.
- The browser process grants the renderer read access to the resulting zip file, which the attacker's JavaScript can then read and exfiltrate to a remote 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.
When you pick a file like an app bundle on a Mac, Chrome sometimes compresses it into a zip file. This report says that if the bundle contains shortcuts (symlinks) to other files, Chrome might follow those shortcuts and include the other files in the zip. An attacker could trick you into selecting a malicious bundle, and then steal your private files like SSH keys.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.