Improper handling of case sensitivity in FileSystem (CVE-2026-78959)
On case-insensitive filesystems, the File System Access API's permission revocation logic compared paths case-sensitively, so a recursive directory removal could fail to downgrade or revoke read grants for descendant files. An attacker could then keep a stored file handle and read a newly created file at the same path without a fresh user prompt.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: On Windows and macOS, case-insensitive filesystems can allow origins to potentially bypass permission revocation checks in the File System Access API. Because base::FilePath::IsParent performs case-sensitive checks on non-drive components, case differences or 8.3 aliased prefixes in paths prevent correct descendant grant downgrades during recursive directory removal. This potential bypass can allow origins to retain active and persisted read permissions for files inside recursively deleted directories.
Affected files:
chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
Estimated timestamp from git blame: 2026-05-14
Summary
A potential logical security bypass has been identified in the File System Access API's permission context on case-insensitive filesystems (such as NTFS on Windows and APFS/FAT on macOS). Due to case-sensitive path comparisons used during recursive directory removal, active and persisted read grants for deleted sub-elements or descendant paths may fail to be downgraded or revoked.
File Affected: chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
Root Cause Analysis
Under the kFileSystemAccessRevokeReadOnRemove security mitigation, when a directory is recursively removed (e.g., via dirHandle.remove({recursive: true})), the browser calls NotifyEntryRemoved to downgrade and revoke all active and persisted read grants for the deleted entry and any of its descendants.
The validation helper is defined as:
auto is_path_or_descendant = [&](const base::FilePath& file_path) {
return file_path == path.path || path.path.IsParent(file_path);
};
However, both base::FilePath::operator== and base::FilePath::IsParent (defined in base/files/file_path.cc) perform strictly case-sensitive string comparisons for all non-drive/non-UNC path components across all platforms (including Windows and macOS).
Since active read grants are stored verbatim as selected via the file picker without case normalization, any case discrepancy (e.g., Project vs project) or 8.3 short-name alias discrepancy (e.g., PROGRA~1 vs Program Files) between the originally registered read grant and the subsequent deletion event causes IsParent and operator== to evaluate to false. Consequently, active and persistent permission grants for the deleted sub-elements are not revoked or downgraded.
Suggested Attack Scenario
Note: These are suggested/potential steps, as our analysis is static and our tooling agent does not have the ability to run code.
- An origin calls
showOpenFilePicker()to let the user select a file on a case-insensitive filesystem, registering a read grant verbatim (e.g.,C:\\Users\\Alice\\Project\\config.json). The origin saves the serializedFileSystemFileHandlein IndexedDB. - The parent directory is renamed with a case modification outside of the browser (e.g.,
C:\\Users\\Alice\\ProjecttoC:\\Users\\Alice\\project). - The origin calls
showDirectoryPicker({mode: 'readwrite'})and the user selects the renamed directoryC:\\Users\\Alice\\project, giving the origin write access to the folder. - The origin calls
dirHandle.remove({recursive: true})on the directory handle, triggering a recursive deletion ofC:\\Users\\Alice\\project. - The browser processes the removal notification under
C:\\Users\\Alice\\project. When evaluating descendants, the case-sensitiveIsParentcheck fails to match the active grant pathC:\\Users\\Alice\\Project\\config.jsonagainst the removed path prefix. - The read grant for
config.jsonis not downgraded. - If a new file is subsequently created at that physical disk path, the origin can re-hydrate its stored file handle from IndexedDB and call
getFile()to read the new contents without a user prompt.
Potential Remediation
To resolve this issue, the descendant walk in NotifyEntryRemoved should handle case-insensitivity and path normalization correctly for platforms with case-insensitive filesystems (such as Windows and macOS). Alternatively, paths should be normalized prior to comparing parent-descendant relationships or looking up active/persisted grants.
Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040
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 descendant check used case-sensitive path comparison helpers, so grants stored with different casing or 8.3 aliases were not recognised as descendants of the removed directory.
Impact
An origin could retain read access to files inside a deleted directory and read newly created files at those paths without a user prompt, though the analysis is static and the steps are only suggested.
What the attacker needed
Windows or macOS case-insensitive filesystem; user picks a file and a directory; directory renamed with different case; user grants read-write on the directory
The fix
The descendant walk should handle case-insensitivity and path normalisation on case-insensitive platforms, or paths should be normalised before comparing parent-descendant relationships.
How it was found
- The origin asks the user to pick a file, which registers a read grant stored verbatim, and saves the handle in IndexedDB.
- The parent directory is renamed with a different case outside the browser.
- The origin asks the user to pick the renamed directory with read-write mode.
- The origin calls recursive remove on the directory handle.
- The case-sensitive descendant check fails to match the stored grant path, so the read grant is not downgraded.
- If a new file is created at that path, the origin re-hydrates the stored handle and reads it without a prompt.
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 the browser, the site is given permission to read it, and that permission is meant to be taken away if the folder is deleted. On Windows and macOS, file names are treated as the same regardless of capital letters, but the browser's check compared them letter by letter. So a site could keep its old permission and read a new file that later appeared in that spot without asking you again.
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.