Incorrect authorization in Downloads (CVE-2026-78898)
A case-sensitive path comparison in Chrome's download path reservation allows a file:// URL with altered case to bypass the self-download block, creating a duplicate file that lacks the Mark-of-the-Web. An attacker could use this to strip internet-download warnings from an executable, so it runs without Gatekeeper or SmartScreen prompts.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 months
Flapjack, 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: A potential Mark-of-the-Web (MotW) bypass exists because DownloadPathReservationTracker uses case-sensitive path comparisons on case-insensitive filesystems. An attacker can use a mismatched-case file:// URL to bypass the self-download block and strip the MotW. This results in a copied executable lacking Gatekeeper or SmartScreen protections.
Affected files:
components/download/internal/common/download_path_reservation_tracker.cc
Estimated timestamp from git blame: 2021-10-21
Vulnerability Summary
A potential Mark-of-the-Web (MotW) bypass exists in DownloadPathReservationTracker::ValidatePathAndResolveConflicts. By exploiting a case mismatch on a case-insensitive filesystem (such as macOS APFS/HFS+ or Windows NTFS), an attacker can bypass the security check designed to prevent a file from being downloaded onto itself. This results in the creation of a duplicate file with its internet MotW stripped.
Technical Details
When reserving a download path, Chrome attempts to prevent MotW stripping by blocking downloads where the source and target paths are identical:
// components/download/internal/common/download_path_reservation_tracker.cc
if (*target_path == info.source_path)
return PathValidationResult::SAME_AS_SOURCE;
The vulnerability occurs because base::FilePath::operator== performs a strict, case-sensitive string comparison on macOS (and for path bodies on Windows). However, the underlying filesystems on these operating systems are typically case-insensitive.
If a download is initiated from a file:// URL where the path case is artificially altered (e.g., PAYLOAD.EXE instead of payload.exe), the *target_path == info.source_path check evaluates to false.
Standard processing then continues: IsPathInUse correctly detects the file's existence on disk (as base::PathExists relies on the case-insensitive OS API), and Chrome resolves this "conflict" by uniquifying the target filename (e.g., payload (1).exe).
Because the source scheme is file://, Chrome's quarantine service (e.g., in quarantine_mac.mm) applies a local attribute such as kLSQuarantineTypeOtherDownload rather than kLSQuarantineTypeWebDownload. The resulting copy is treated as a locally sourced file, effectively stripping the restrictive internet MotW.
Potential Exploitation Steps
Note: These are suggested steps based on static code analysis; our tooling agent does not execute live proof-of-concept code to verify.
- A victim downloads a malicious file (e.g.,
payload.exe) to their Downloads folder, which correctly receives an internet MotW from the OS. - The victim opens a locally saved attacker HTML file (
file://origin), which has the necessary privileges to request otherfile://URLs. - The HTML file triggers a programmatic download of the payload using an altered-case source URL but a normal-case target:
<a href="file:///Users/user/Downloads/PAYLOAD.EXE" download="payload.exe">. - The
SAME_AS_SOURCEcheck is bypassed due to the case-sensitive string comparison in Chrome. - Chrome creates a copy of the payload (e.g.,
payload (1).exe) and assigns it a local quarantine attribute. - The new copy can be executed by the user without triggering Gatekeeper or SmartScreen internet-download warnings.
Suggested Fix
Path equality checks in ValidatePathAndResolveConflicts should account for the case sensitivity of the underlying filesystem. Use a case-insensitive comparison like base::FilePath::CompareEqualIgnoreCase on affected platforms, or preferably, compare the underlying filesystem identity (e.g., checking device and inode numbers) to robustly verify if the source and target represent the exact same physical file.
Evaluated with Chrome root at commit: 09ec9e7cc4d24823d20b6d37cf3d282734f6bf0f
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
Likely the path equality check uses a case-sensitive string comparison while the underlying filesystem is case-insensitive, so differently-cased paths to the same file are not recognised as identical.
Impact
A copied executable could be run without Gatekeeper or SmartScreen internet-download warnings, but the report is based on static analysis and was not verified with a live proof of concept.
What the attacker needed
Victim downloads a malicious file; victim opens a local attacker HTML file; case-insensitive filesystem
The fix
Path equality checks should account for filesystem case sensitivity, for example by using a case-insensitive comparison on affected platforms or by comparing device and inode numbers.
How it was found
- The victim downloads a malicious file to their Downloads folder, which gets an internet Mark-of-the-Web.
- The victim opens a locally saved attacker HTML file from a file:// origin.
- The HTML triggers a download using an altered-case source URL but a normal-case target filename.
- The same-as-source check is bypassed because of the case-sensitive comparison.
- Chrome creates a copy of the payload and gives it a local quarantine attribute.
- The new copy can be run without Gatekeeper or SmartScreen internet-download warnings.
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 download a file, your computer often tags it as coming from the internet (the Mark-of-the-Web). This tag makes the system warn you before running it. Chrome tries to stop a download that would just copy a file onto itself, because that could remove the tag. Here, Chrome compared file paths in a case-sensitive way, but the disk treats upper and lower case as the same, so a slightly different spelling slipped past the check and produced an untagged copy.
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.