Skip to content
Race condition Advisory Advanced CVE-2026-17873

Insufficient policy enforcement in Chrome for iOS (CVE-2026-17873)

A logic error in the iOS download manager allows a second download to be saved without a completed enterprise scan when a warning dialog for a previous download is still open. An attacker could use this to bypass enterprise content scanning and save a malicious file to the device.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 50 days

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A logic error in DownloadManagerTabHelper on iOS allows an attacker to bypass enterprise content scanning. If a new download is initiated while a scan warning dialog for a previous download is open, the callback processes the new download instead. This allows the second file to be saved to the device without being fully scanned, bypassing enterprise policies.

Affected files:

  • ios/chrome/browser/download/model/download_manager_tab_helper.mm

Estimated timestamp from git blame: 2026-03-23

Summary

A potential security bypass vulnerability exists in the enterprise content scanning implementation for downloads on iOS. The DownloadManagerTabHelper fails to correctly associate asynchronous scan results with the specific download task that initiated the scan. By exploiting a race condition, an attacker can substitute a malicious payload while a warning dialog is open, causing the payload to be saved to the device without completing a scan.

Vulnerability Details

When a download completes and requires enterprise scanning, DownloadManagerTabHelper::ProcessCompleteDownloadTask initiates the scan. It provides a completion callback, MaybeMoveDownloadToDownloadsDirectory, which is bound to a WeakPtr of the DownloadManagerTabHelper instance.

C++
// ios/chrome/browser/download/model/download_manager_tab_helper.mm
void DownloadManagerTabHelper::ProcessCompleteDownloadTask() {
  // ...
  auto files_request_handler_delegate = std::make_unique<
      enterprise_connectors::FilesRequestHandlerIOS>(
      profile, task_->GetResponsePath(),
      base::BindOnce(
          &enterprise_connectors::HandleScanDecision, web_state_->GetWeakPtr(),
          enterprise_connectors::TriggerType::kSavePrompt,
          base::BindOnce(
              &DownloadManagerTabHelper::MaybeMoveDownloadToDownloadsDirectory,
              weak_ptr_factory_.GetWeakPtr())));
  // ...
}

The issue is that this callback does not capture the specific DownloadTask instance. DownloadManagerTabHelper only manages one active task_ at a time. If a new download starts, DidCreateDownload calls CleanupCurrentDownload(), resetting the task_ and files_request_handler_, and then assigns the new task. However, the modal warning dialog shown for the first task remains open.

When the user eventually interacts with the dialog, MaybeMoveDownloadToDownloadsDirectory executes and operates entirely on the current task_ and files_request_handler_.

Potential Exploitation Steps

An attacker could potentially exploit this using the following steps:

  1. A malicious script initiates a download of File A, designed to trigger a WARNING verdict from the enterprise scanner.
  2. The user sees a modal warning dialog asking them to "Proceed" or "Cancel".
  3. While the dialog is open, the script initiates a second download, File B (the actual malicious payload). File B replaces File A as the active task_ in the tab helper.
  4. File B is served from a fast server so its local download finishes quickly, and ProcessCompleteDownloadTask is called for File B, creating a new files_request_handler_ to start its scan.
  5. The user clicks "Proceed" on the original dialog for File A.
  6. The callback executes MaybeMoveDownloadToDownloadsDirectory(true).
  7. The code calls files_request_handler_->ReportWarningBypass(...). Since File B hasn't reached a warning state yet, this returns early without crashing.
  8. The code resolves the file path using the current task_ (File B) and moves File B to the permanent user downloads directory.
  9. The callback calls files_request_handler_.reset(), which immediately cancels File B's active scan.

The timing is important: File B must have finished its local download and entered the scanning phase (so files_request_handler_ is non-null) before the user clicks "Proceed". If files_request_handler_ is null, the browser will crash at line 394 due to a null pointer dereference.

Proposed Fix

The completion callback provided to the scanner should be bound with a specific identifier (e.g., the DownloadTask pointer or a unique ID) representing the task that was originally scanned.

MaybeMoveDownloadToDownloadsDirectory should be updated to verify that the current task_ matches the task associated with the callback. If they do not match (meaning the download was replaced), the callback should abort the operation instead of moving the new, unscanned file.

Evaluated with Chrome root at commit: 2155cb00003ec35716a76ed3246eae995f87b7ff


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 scan completion callback is not tied to the specific download task it was created for, so it acts on whatever download is currently active.

Impact

An attacker could bypass enterprise content scanning and save a malicious file to the device, but the exploit requires precise timing and a user click on the warning dialog.

What the attacker needed

IOS device with enterprise content scanning; attacker-controlled script; user clicks Proceed on warning dialog; precise timing of downloads

The fix

The completion callback should be bound to the specific download task and should abort if the current task does not match.

How it was found

  1. A script starts downloading a file that triggers a warning from the enterprise scanner.
  2. The user sees a modal warning dialog with Proceed and Cancel options.
  3. While the dialog is open, the script starts a second download, which replaces the first as the active task.
  4. The second file downloads quickly and enters the scanning phase.
  5. The user clicks Proceed on the original dialog.
  6. The callback moves the second file to the downloads directory and cancels its scan.

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 on a work phone, the company may scan it for malware before saving. This report shows that if you start a second download while a warning about the first is still on screen, the second file can be saved without being fully scanned. That means a bad file could get onto the device even though the security check was supposed to stop it.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.