Skip to content
Access control Advisory Advanced CVE-2026-87465

Incorrect authorization in Downloads (CVE-2026-87465)

A compromised renderer can set the is_context_menu_save flag in the DownloadURL IPC to bypass BackForwardCache activity checks and automatic download throttles, allowing an inactive frame to trigger a Save As dialog attributed to the visible tab. It also enables spoofing of Mark-of-the-Web referrer metadata.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A compromised renderer can bypass BackForwardCache (BFCache) activity checks and automatic download throttles by spoofing the is_context_menu_save flag in the DownloadURL IPC. This allows an inactive frame to trigger a Save As dialog attributed to the currently visible tab. It also enables spoofing of Mark-of-the-Web (MOTW) referrer metadata.

Affected files:

  • content/browser/download/download_manager_impl.cc
  • content/browser/renderer_host/render_frame_host_impl.cc
  • content/browser/renderer_host/ipc_utils.cc
  • third_party/blink/public/mojom/frame/frame.mojom

Estimated timestamp from git blame: 2024-12-10

Description

The DownloadURL IPC call in RenderFrameHostImpl handles download requests from the renderer. One of the parameters in blink::mojom::DownloadURLParams is is_context_menu_save, which is intended to indicate if the download was initiated via a user right-clicking and selecting 'Save Link As...'.

In RenderFrameHostImpl::DownloadURL, the content_initiated flag is calculated as !blink_parameters->is_context_menu_save. This flag is then passed to DownloadManagerImpl::BeginDownloadInternal.

In DownloadManagerImpl::BeginDownloadInternal, several critical security checks are gated behind the content_initiated flag:

C++
if (rfh && content_initiated) {
  if (rfh->IsInactiveAndDisallowActivation(
          RenderFrameHost::InactiveCheckAllowedReason::kBeginDownload)) {
    return;
  }
  // ... throttle checks ...
  if (!delegate_->CheckDownloadAllowed(...)) {
    return;
  }
}

A compromised renderer can arbitrarily set is_context_menu_save to true, forcing content_initiated to be false. This results in the following security bypasses:

  1. BFCache Activity Gate Bypass: The call to IsInactiveAndDisallowActivation is skipped. This allows a RenderFrameHost that is currently in the BackForwardCache (and thus should be inactive) to successfully initiate a download.
  2. Automatic Download Throttle Bypass: The delegate_->CheckDownloadAllowed call, which enforces automatic download throttles and user gesture requirements, is skipped.
  3. UI Spoofing: Because the download is initiated from a BFCached frame while a new page is visible in the tab, the 'Save As' dialog (triggered because prompt is set to true when is_context_menu_save is true) appears while the user is looking at a different origin. The tab_url for the download is taken from the current visible entry, leading to incorrect attribution in the download UI.
  4. Mark-of-the-Web (MOTW) Spoofing: The renderer-provided referrer URL is not validated against the frame's origin in VerifyDownloadUrlParams. This unvalidated URL is eventually used to set the Mark-of-the-Web (MOTW) ReferrerUrl and HostUrl on Windows (e.g., via BaseFile::GetEffectiveAuthorityURL for data: URLs and then quarantine::SetInternetZoneIdentifierDirectly), allowing an attacker to falsely attribute a malicious payload to a trusted site.

Potential Reproduction Steps (AI Suggested)

Note: These are suggested steps, as this AI agent does not have the ability to run code to verify them.

  1. Obtain renderer RCE in a process hosting attacker.com.
  2. Navigate a tab from attacker.com to a trusted site like https://victim.com/. The attacker.com RenderFrameHost enters the BFCache.
  3. From the compromised attacker.com renderer process, craft a blink::mojom::DownloadURLParams struct.
  4. Set is_context_menu_save = true, url to a malicious payload (e.g., a data: URI containing an executable), and referrer to https://victim.com/.
  5. Send this struct to the browser process via the blink::mojom::LocalFrameHost::DownloadURL IPC endpoint.
  6. The browser will skip the BFCache check and prompt the user with a 'Save As' dialog while victim.com is in the address bar.
  7. Upon completion, the downloaded file's Mark-of-the-Web Zone.Identifier on Windows will contain ReferrerUrl=https://victim.com/ and HostUrl=https://victim.com/.

Suggested Fix

The browser process should not trust the is_context_menu_save flag from the renderer for critical security checks like BFCache gating and download throttling. Context menu saves are typically initiated by the browser process itself. If this IPC must be used for context menu saves, the browser process should independently verify that a valid context menu action recently occurred for that frame. Additionally, the referrer provided in DownloadURLParams should be validated against the requesting frame's origin in VerifyDownloadUrlParams to prevent MOTW spoofing.

Evaluated with Chrome root at commit: bb48272cafb7e24c93f55ef40da398cd206ee651


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. Please feel free to reach out to me if you have concerns or feedback.

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 browser process trusted a renderer-supplied flag (is_context_menu_save) to decide whether to enforce security checks, and did not validate the referrer against the frame's origin.

Impact

An attacker with renderer compromise could bypass download throttles, show a misleading Save As dialog attributed to a trusted site, and spoof Mark-of-the-Web metadata on Windows.

What the attacker needed

Compromised renderer process; victim navigates to a trusted site; user interacts with Save As dialog

How it was found

  1. Obtain renderer RCE in a process hosting attacker.com.
  2. Navigate a tab from attacker.com to a trusted site so the attacker.com frame enters the BFCache.
  3. From the compromised renderer, craft a DownloadURLParams struct with is_context_menu_save set to true, a malicious data: URI, and a referrer pointing to the trusted site.
  4. Send the struct to the browser process via the DownloadURL IPC endpoint.
  5. The browser skips the BFCache check and shows a Save As dialog while the trusted site is in the address bar.
  6. The downloaded file's Mark-of-the-Web metadata contains the spoofed referrer and host URLs.

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.

A renderer is the part of a browser that turns web code into a page; if an attacker takes it over, they can send fake messages to the browser's core. Here, a flag meant to mark a user's right-click 'Save As' action was trusted, so the core skipped safety checks and showed a download prompt that looked like it came from a trusted site. This could trick someone into saving a malicious file under a trusted name.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.