Skip to content
CSRF Advisory Advanced CVE-2026-5894

Inappropriate implementation in PDF (CVE-2026-5894)

When the built-in PDF viewer is disabled, clicking the 'Open' button on a cross-origin embedded PDF placeholder triggers a download request that is misclassified as browser-initiated, sending 'Sec-Fetch-Site: none' instead of 'cross-site'. This could let an attacker bypass Fetch Metadata-based CSRF protections on sensitive download endpoints.

Povcfe Follow

Originally disclosed on Chrome VRP

Bounty$1,000 Low View original
  • Fix shipped in 2 months

Report description

Cross-origin PDF placeholder download misclassified as browser-initiated request


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://chromium.googlesource.com/chromium/src/


The problem

Please describe the technical details of the vulnerability

1. technical details

When the built-in PDF viewer is disabled and an embedded PDF falls back to a plugin placeholder with an "Open" button, the browser process initiates a download for the embedded PDF URL via PluginObserver::OpenPDF. In this code path, the download request is constructed without setting the initiator origin, so the network stack will treat the request as browser-initiated and omit the cross-site relationship in Fetch Metadata headers.

In the browser process, PluginObserver::OpenPDF creates download::DownloadUrlParameters for the embedded PDF resource but never populates the initiator origin:

C++
// chromium/src/chrome/browser/plugins/plugin_observer.cc
void PluginObserver::OpenPDF(const GURL& url) {
  content::RenderFrameHost* render_frame_host =
      plugin_host_receivers_.GetCurrentTargetFrame();
  // WebViews should never trigger PDF downloads.
  if (extensions::WebViewGuest::FromRenderFrameHost(render_frame_host))
    return;

  content::Referrer referrer;
  if (!CanOpenPdfUrl(render_frame_host, url,
                     web_contents()->GetLastCommittedURL(), &referrer)) {
    return;
  }

  net::NetworkTrafficAnnotationTag traffic_annotation =
      net::DefineNetworkTrafficAnnotation("pdf_plugin_placeholder", R"(
        semantics {
          sender: "PDF Plugin Placeholder"
          description:
            "When the PDF Viewer is unavailable, a placeholder is shown for "
            "embedded PDFs. This placeholder allows the user to download and "
            "open the PDF file via a button."
          trigger:
            "The user clicks the 'View PDF' button in the PDF placeholder."
          data: "None."
          destination: WEBSITE
        }
        policy {
          cookies_allowed: NO
          setting:
            "This feature can be disabled via 'Download PDF files instead of "
            "automatically opening them in Chrome' in settings under content. "
            "The feature is disabled by default."
          chrome_policy {
            AlwaysOpenPdfExternally {
              AlwaysOpenPdfExternally: false
            }
          }
        })");
  std::unique_ptr<download::DownloadUrlParameters> params =
      std::make_unique<download::DownloadUrlParameters>(
          url,
          render_frame_host->GetRenderViewHost()
              ->GetProcess()
              ->GetDeprecatedID(),
          render_frame_host->GetRoutingID(), traffic_annotation);
  params->set_referrer(referrer.url);
  params->set_referrer_policy(
      content::Referrer::ReferrerPolicyForUrlRequest(referrer.policy));

  web_contents()->GetBrowserContext()->GetDownloadManager()->DownloadUrl(
      std::move(params));
}

DownloadUrlParameters defaults the initiator to empty unless explicitly set, and CreateResourceRequest copies this value into the network::ResourceRequest that is sent to the network service:

C++
// chromium/src/components/download/internal/common/download_utils.cc
std::unique_ptr<network::ResourceRequest> CreateResourceRequest(
    DownloadUrlParameters* params) {
  DCHECK_GE(params->offset(), 0);

  std::unique_ptr<network::ResourceRequest> request(
      new network::ResourceRequest);
  request->method = params->method();
  request->url = params->url();
  request->request_initiator = params->initiator();
  request->trusted_params = network::ResourceRequest::TrustedParams();
  request->has_user_gesture = params->has_user_gesture();
  ...
}

In the network stack, the Fetch Metadata helper interprets a missing initiator origin on a browser-initiated request as a "no site" relation and maps it to Sec-Fetch-Site: none:

C++
// chromium/src/services/network/sec_header_helpers.cc
std::optional<net::OriginRelation> GetInitiatorRelation(
    const net::URLRequest& request,
    base::optional_ref<const GURL> pending_redirect_url,
    const mojom::URLLoaderFactoryParams& factory_params,
    const cors::OriginAccessList& origin_access_list) {
  // Browser-initiated requests with no initiator origin will send
  // `Sec-Fetch-Site: None`.
  if (!request.initiator().has_value()) {
    // CorsURLLoaderFactory::IsValidRequest verifies that only the browser
    // process may initiate requests with no request initiator.
    DCHECK(factory_params.process_id.is_browser());

    return std::nullopt;
  }
  const url::Origin& initiator = request.initiator().value();
  ...
}

As a result, when a page at origin A embeds a PDF from origin B and the user clicks the "Open" button in the PDF placeholder, the resulting download request to origin B carries Sec-Fetch-Site: none even though it was actually triggered from a cross-origin page.

2. vulnerability reproduction

The PoC is provided in web/open_pdf_none. It simulates a page on one origin embedding a PDF resource served from another origin using different ports on the same IP address.

Environment:

  • Build and run the browser from this repository.
  • Configure the browser so that PDF files are downloaded instead of opened in the built-in PDF viewer (for example via the PDF documents content setting).

Steps:

  1. In a terminal, start both the attacker and PDF servers:

    • cd web/open_pdf_none
    • python3 run_servers.py
  2. In the browser, open the attacker page from one origin:

    • http://<ip-address>:8000/attacker.html
  3. Confirm that the embedded PDF area shows a gray placeholder with an "Open" style button instead of an inline PDF viewer.

  4. Click the "Open" button inside the placeholder to trigger the download of the cross-origin target.pdf.

  5. Observe the server output from run_servers.py for the request on port 8001. A typical log shows:

    Text
    === incoming request on 8001 ===
    PATH: /target.pdf
    Host: localhost:8001
    Sec-Fetch-Site: none
    Sec-Fetch-Mode: navigate
    Sec-Fetch-Dest: empty
    Referer: http://<ip-address>:8000/
    User-Agent: ...
    ...
    =================================
    

This demonstrates that a request to the PDF origin (port 8001) is triggered from a different origin (port 8000) but still carries Sec-Fetch-Site: none instead of being classified as a cross-site request.

Impact analysis

Any web origin that can cause the browser to render the PDF plugin placeholder for an embedded cross-origin PDF (for example by embedding a PDF from a different host or port while PDF viewing is disabled) can trigger this behavior. When a user clicks the placeholder's "Open" button, the browser initiates a download to the cross-origin PDF URL with Sec-Fetch-Site: none, even though the request was indirectly triggered by the embedding page.

Servers that rely on Fetch Metadata, and specifically on rejecting Sec-Fetch-Site: cross-site for sensitive download or export endpoints, may incorrectly treat these requests as if they were direct browser navigations without a web initiator. This allows an embedding site to drive a user's browser to access cross-origin PDF download or export endpoints that would otherwise be blocked by stricter Fetch Metadata-based policies, potentially undermining access control or CSRF-like protections that depend on accurate site relationship classification.


The cause

What version of Chrome have you found the security issue in?

146.0.7666.1/stable

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Cross-site request forgery (CSRF)

How would you like to be publicly acknowledged for your report?

Povcfe of Tencent Security Xuanwu Lab

The original report as published on the Chromium issue tracker, by Povcfe of Tencent Security Xuanwu Lab. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

Chrome ships a built-in PDF viewer. When that viewer is unavailable, an embedded PDF is replaced by a plugin placeholder that offers an "Open" button, and clicking it makes the browser process start a download of the embedded PDF URL through PluginObserver::OpenPDF. The report examines what that download request looks like on the wire when the PDF is served from a different origin than the embedding page, and how the network stack classifies it in Fetch Metadata headers.

The issue was reported to the Chrome Vulnerability Reward Program, affecting the Chromium source at https://chromium.googlesource.com/chromium/src/, and was classified as cross-site request forgery (CSRF) with the weakness "Inappropriate implementation". The researcher is credited as Povcfe of Tencent Security Xuanwu Lab. The affected version given in the report is 146.0.7666.1/stable, and the issue is not related to a crash.

Setup

The precondition is a browser configured so that PDF files are downloaded instead of being opened in the built-in PDF viewer, for example through the PDF documents content setting. The proof of concept lives in web/open_pdf_none in the researcher's repository and simulates a page on one origin embedding a PDF served from another origin, using different ports on the same IP address.

The reproduction environment is:

  • Build and run the browser from the repository.
  • Configure the browser so that PDF files are downloaded instead of opened in the built-in PDF viewer (for example via the PDF documents content setting).

Finding it

The researcher traced the placeholder's "Open" button into the browser process. PluginObserver::OpenPDF builds a download::DownloadUrlParameters for the embedded PDF resource, but never populates the initiator origin. DownloadUrlParameters defaults the initiator to empty unless it is explicitly set, and CreateResourceRequest copies that value into the network::ResourceRequest sent to the network service. In the network stack, the Fetch Metadata helper treats a missing initiator origin on a browser-initiated request as a "no site" relation and maps it to Sec-Fetch-Site: none.

The consequence the researcher identified: when a page at origin A embeds a PDF from origin B and the user clicks "Open" in the placeholder, the download request to origin B carries Sec-Fetch-Site: none even though it was actually triggered from a cross-origin page. That mismatch between the real site relationship and the header value is what looked wrong.

Exploitation

Step 1: start the attacker and PDF servers

From the PoC directory, run the server script:

Bash
cd web/open_pdf_none
python3 run_servers.py

The log shows the attacker page on port 8000 and the PDF on port 8001, on the same IP address.

Step 2: open the attacker page

In the browser, load the attacker page from one origin:

Text
http://<ip-address>:8000/attacker.html

The request observed on port 8001 is for target.pdf.

Step 3: confirm the placeholder is shown

Check that the embedded PDF area shows a grey placeholder with an "Open" style button instead of an inline PDF viewer. This confirms the embedded PDF area shows the placeholder rather than an inline viewer.

Step 4: click "Open"

Clicking the "Open" button inside the placeholder triggers the download of the cross-origin target.pdf.

Step 5: read the server log

Observe the output of run_servers.py for the request on port 8001. A typical log entry looks like this:

Text
=== incoming request on 8001 ===
PATH: /target.pdf
Host: localhost:8001
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: empty
Referer: http://<ip-address>:8000/
User-Agent: ...
...
=================================

The request goes to the PDF origin on port 8001 but was triggered from a different origin on port 8000. The Referer header still points at the embedding page, yet Sec-Fetch-Site is none rather than cross-site. That is the demonstration: the request is not classified as a cross-site request.

Root cause

In the browser process, PluginObserver::OpenPDF creates download::DownloadUrlParameters for the embedded PDF resource but never populates the initiator origin:

C++
// chromium/src/chrome/browser/plugins/plugin_observer.cc
void PluginObserver::OpenPDF(const GURL& url) {
  content::RenderFrameHost* render_frame_host =
      plugin_host_receivers_.GetCurrentTargetFrame();
  // WebViews should never trigger PDF downloads.
  if (extensions::WebViewGuest::FromRenderFrameHost(render_frame_host))
    return;

  content::Referrer referrer;
  if (!CanOpenPdfUrl(render_frame_host, url,
                     web_contents()->GetLastCommittedURL(), &referrer)) {
    return;
  }

  net::NetworkTrafficAnnotationTag traffic_annotation =
      net::DefineNetworkTrafficAnnotation("pdf_plugin_placeholder", R"(
        semantics {
          sender: "PDF Plugin Placeholder"
          description:
            "When the PDF Viewer is unavailable, a placeholder is shown for "
            "embedded PDFs. This placeholder allows the user to download and "
            "open the PDF file via a button."
          trigger:
            "The user clicks the 'View PDF' button in the PDF placeholder."
          data: "None."
          destination: WEBSITE
        }
        policy {
          cookies_allowed: NO
          setting:
            "This feature can be disabled via 'Download PDF files instead of "
            "automatically opening them in Chrome' in settings under content. "
            "The feature is disabled by default."
          chrome_policy {
            AlwaysOpenPdfExternally {
              AlwaysOpenPdfExternally: false
            }
          }
        })");
  std::unique_ptr<download::DownloadUrlParameters> params =
      std::make_unique<download::DownloadUrlParameters>(
          url,
          render_frame_host->GetRenderViewHost()
              ->GetProcess()
              ->GetDeprecatedID(),
          render_frame_host->GetRoutingID(), traffic_annotation);
  params->set_referrer(referrer.url);
  params->set_referrer_policy(
      content::Referrer::ReferrerPolicyForUrlRequest(referrer.policy));

  web_contents()->GetBrowserContext()->GetDownloadManager()->DownloadUrl(
      std::move(params));
}

DownloadUrlParameters defaults the initiator to empty unless explicitly set, and CreateResourceRequest copies this value into the network::ResourceRequest that is sent to the network service:

C++
// chromium/src/components/download/internal/common/download_utils.cc
std::unique_ptr<network::ResourceRequest> CreateResourceRequest(
    DownloadUrlParameters* params) {
  DCHECK_GE(params->offset(), 0);

  std::unique_ptr<network::ResourceRequest> request(
      new network::ResourceRequest);
  request->method = params->method();
  request->url = params->url();
  request->request_initiator = params->initiator();
  request->trusted_params = network::ResourceRequest::TrustedParams();
  request->has_user_gesture = params->has_user_gesture();
  ...
}

In the network stack, the Fetch Metadata helper interprets a missing initiator origin on a browser-initiated request as a "no site" relation and maps it to Sec-Fetch-Site: none:

C++
// chromium/src/services/network/sec_header_helpers.cc
std::optional<net::OriginRelation> GetInitiatorRelation(
    const net::URLRequest& request,
    base::optional_ref<const GURL> pending_redirect_url,
    const mojom::URLLoaderFactoryParams& factory_params,
    const cors::OriginAccessList& origin_access_list) {
  // Browser-initiated requests with no initiator origin will send
  // `Sec-Fetch-Site: None`.
  if (!request.initiator().has_value()) {
    // CorsURLLoaderFactory::IsValidRequest verifies that only the browser
    // process may initiate requests with no request initiator.
    DCHECK(factory_params.process_id.is_browser());

    return std::nullopt;
  }
  const url::Origin& initiator = request.initiator().value();
  ...
}

The code comment states that browser-initiated requests with no initiator origin send Sec-Fetch-Site: none. The placeholder download breaks that assumption: it is a browser-process download, but it is indirectly driven by the embedding page, and the initiator is simply never recorded. A code comment notes that CorsURLLoaderFactory::IsValidRequest verifies that only the browser process may initiate requests with no request initiator. The Referer header is set from the placeholder's referrer.

Impact

Any web origin that can cause the browser to render the PDF plugin placeholder for an embedded cross-origin PDF, for example by embedding a PDF from a different host or port while PDF viewing is disabled, can trigger this behaviour. When a user clicks the placeholder's "Open" button, the browser initiates a download to the cross-origin PDF URL with Sec-Fetch-Site: none, even though the request was indirectly triggered by the embedding page.

Servers that rely on Fetch Metadata, and specifically on rejecting Sec-Fetch-Site: cross-site for sensitive download or export endpoints, may incorrectly treat these requests as if they were direct browser navigations without a web initiator. This allows an embedding site to drive a user's browser to access cross-origin PDF download or export endpoints that would otherwise be blocked by stricter Fetch Metadata-based policies, potentially undermining access control or CSRF-like protections that depend on accurate site relationship classification.

The report does not describe any further consequence beyond that misclassification.

Fix

The report does not describe a fix or a code change.

Variants to test

  1. Other browser-process downloads triggered from page content. Look for code paths that construct DownloadUrlParameters without calling the initiator setter, then check the resulting request's Sec-Fetch-Site. A positive result is a request to a cross-origin URL that carries Sec-Fetch-Site: none while the Referer shows the embedding page.
  2. Different cross-origin relationships. Repeat the PoC with a different host rather than a different port, and with a different scheme, and compare the header. A positive result is none where cross-site or same-site would be expected.
  3. Endpoints that gate on Fetch Metadata. Point the embedded resource at a download or export endpoint that rejects Sec-Fetch-Site: cross-site. A positive result is the endpoint serving the download when reached through the placeholder, where a direct cross-site request would be refused.
  4. Other placeholder or fallback UI. Check whether similar fallbacks for other embedded content types produce browser-initiated requests without an initiator. A positive result is the same Sec-Fetch-Site: none on a request that a page caused.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

Chrome, Google's web browser, can display PDF documents inside a web page. Normally it uses a built-in PDF viewer for this. But if that viewer is turned off, or the browser is set to download PDFs instead of showing them, Chrome shows a small grey box in place of the PDF. That box has an "Open" button. When you click it, Chrome downloads the PDF file.

The report looks at what happens on the network when that download is for a PDF that lives on a different website from the page you are looking at. Chrome sends Fetch Metadata headers with requests that describe the context the request came from. For this download, Chrome sends the wrong value: it says the request came from nowhere in particular (a direct browser action), when in reality a web page caused it. A server that relies on that information may incorrectly treat the request as a direct browser navigation.

The issue was reported to the Chrome Vulnerability Reward Program, a scheme where Google pays people who find and report security problems in Chrome. The affected code is the Chromium source code, the open-source project Chrome is built from, at https://chromium.googlesource.com/chromium/src/. The report was filed under the category cross-site request forgery (CSRF), with the weakness described as "Inappropriate implementation". The researcher is credited as Povcfe of Tencent Security Xuanwu Lab. The Chrome version named in the report is 146.0.7666.1/stable, and the issue does not cause the browser to crash.

Background you need first

Before the details make sense, here are the ideas the report relies on.

Origin. An origin is the combination of a scheme (like http or https), a host (like example.com), and a port (a number like 8000). Two pages have the same origin only if all three match. http://example.com:8000 and http://example.com:8001 are different origins because the port differs, even though the host is the same. Browsers use origins as a security boundary: a page from one origin should not be able to freely read data from another. Think of it like apartment numbers in the same building: same street address, but different front doors, and the keys do not work across doors.

Embedding. A web page can include content from another origin, for example with an <iframe> or an <embed> tag. The page doing the including is the embedding page; the content being included is embedded. This is common and legitimate (video players, maps, documents), but it means one origin can cause the browser to fetch something from another origin.

HTTP request and response. When your browser wants something from a server, it sends an HTTP request: a line with a method (like GET), a path (like /target.pdf), and a set of headers, which are name/value pairs carrying extra information. The server replies with a response. Headers are how the browser and server exchange metadata about the request.

The Referer header. This header tells the server the address of the page that caused the request. It is spelled Referer (a historical misspelling of "referrer"). It is useful for analytics and some security checks, but it can be stripped or altered, so it is not fully reliable on its own.

Fetch Metadata headers. These are a newer family of headers that the browser adds automatically to describe the context of a request. The most important one here is Sec-Fetch-Site, which says how the origin making the request relates to the origin being requested. Common values are same-origin (identical), same-site (related, e.g. subdomains of the same registrable domain), cross-site (unrelated), and none (the request was started by the browser itself, not by a web page). Servers can use these headers to make security decisions, for example refusing cross-site requests to sensitive endpoints. The idea is that a request genuinely started by the user typing an address or clicking a bookmark has no web page behind it, so none is treated as trustworthy.

CSRF (cross-site request forgery). This is a class of attack where a malicious website causes your browser to send a request to another website, using your existing logged-in session (your cookies), without your intent. The target site sees a request that looks like it came from you and acts on it. Defences include checking the Origin or Referer headers, using anti-CSRF tokens, and checking Fetch Metadata. If a defence relies on Sec-Fetch-Site being cross-site for cross-origin requests, then a request that is really cross-origin but labelled none can slip past it.

The browser process and the network service. Modern Chrome splits its work into multiple processes for security and stability. The browser process is the central coordinator: it handles the address bar, tabs, downloads, and so on. The network service is a separate process that actually makes network requests. The browser process tells the network service what to fetch, and the network service adds the low-level headers, including Fetch Metadata. The two communicate through interfaces defined in code (the mojom files you will see referenced).

Downloads in Chrome. When Chrome downloads a file, it does not simply navigate to it. It creates a download job managed by the DownloadManager. The parameters for that job are held in a DownloadUrlParameters object. One of those parameters is the initiator: the origin of the page that caused the download. If the initiator is empty, the network stack assumes the browser itself started the request, with no web page involved.

The PDF plugin placeholder. Chrome has a built-in PDF viewer. If it is disabled, or if the user has chosen to download PDFs rather than view them, an embedded PDF is replaced by a placeholder: a grey box with an "Open" button. Clicking that button triggers a download of the PDF. The code that handles this is PluginObserver::OpenPDF.

With those ideas in place, the rest of the report should read clearly.

Setup

The precondition is a browser configured so that PDF files are downloaded instead of being opened in the built-in PDF viewer, for example through the PDF documents content setting. The proof of concept lives in web/open_pdf_none in the researcher's repository and simulates a page on one origin embedding a PDF served from another origin, using different ports on the same IP address.

The reproduction environment is:

  • Build and run the browser from the repository.
  • Configure the browser so that PDF files are downloaded instead of opened in the built-in PDF viewer (for example via the PDF documents content setting).

Why this setup matters: the bug only appears on the fallback path, the one where the built-in viewer is not used and the placeholder is shown instead. If the viewer were active, the PDF would be rendered inline and the download code path would not run. Using two ports on the same IP address is a convenient way to create two distinct origins without needing two machines or two domain names.

Finding it

The researcher traced the placeholder's "Open" button into the browser process. PluginObserver::OpenPDF builds a download::DownloadUrlParameters for the embedded PDF resource, but never populates the initiator origin. DownloadUrlParameters defaults the initiator to empty unless it is explicitly set, and CreateResourceRequest copies that value into the network::ResourceRequest sent to the network service. In the network stack, the Fetch Metadata helper treats a missing initiator origin on a browser-initiated request as a "no site" relation and maps it to Sec-Fetch-Site: none.

The consequence the researcher identified: when a page at origin A embeds a PDF from origin B and the user clicks "Open" in the placeholder, the download request to origin B carries Sec-Fetch-Site: none even though it was actually triggered from a cross-origin page. That mismatch between the real site relationship and the header value is what looked wrong.

In plain terms: the code that starts the download forgets to record which page asked for it. The network layer sees "no page asked for this" and labels the request as if the user had typed the address themselves. But a page did ask for it, just indirectly, through the placeholder button.

Exploitation

Step 1: start the attacker and PDF servers

From the PoC directory, run the server script:

Bash
cd web/open_pdf_none
python3 run_servers.py

Line by line:

  • cd web/open_pdf_none changes the current directory to the folder containing the proof of concept. cd is the shell command for "change directory".
  • python3 run_servers.py runs a Python script using the Python 3 interpreter. The script starts two small web servers at once.

The log shows the attacker page on port 8000 and the PDF on port 8001, on the same IP address. Because the ports differ, the two are different origins, which is exactly the situation the bug needs.

Step 2: open the attacker page

In the browser, load the attacker page from one origin:

Text
http://<ip-address>:8000/attacker.html

This is a URL. http is the scheme, <ip-address> is the numeric address of the machine running the servers (the report uses a placeholder because the real address depends on your setup), 8000 is the port, and /attacker.html is the path to the page. Opening this URL loads the attacker page; the request observed on port 8001 is for target.pdf.

Step 3: confirm the placeholder is shown

Check that the embedded PDF area shows a grey placeholder with an "Open" style button instead of an inline PDF viewer. This confirms the embedded PDF area shows the placeholder rather than an inline viewer. If you saw the PDF rendered inline instead, the browser is not configured as required and the rest of the steps would not reproduce the issue.

Step 4: click "Open"

Clicking the "Open" button inside the placeholder triggers the download of the cross-origin target.pdf. This is the user action the bug depends on: the request is not automatic, it needs a click. That click is what makes the browser process start the download.

Step 5: read the server log

Observe the output of run_servers.py for the request on port 8001. A typical log entry looks like this:

Text
=== incoming request on 8001 ===
PATH: /target.pdf
Host: localhost:8001
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: empty
Referer: http://<ip-address>:8000/
User-Agent: ...
...
=================================

Line by line:

  • === incoming request on 8001 === is a marker printed by the script to show that a request arrived on the server listening on port 8001 (the PDF server).
  • PATH: /target.pdf is the path the browser asked for: the PDF file.
  • Host: localhost:8001 is the host and port the request was addressed to. localhost means the same machine.
  • Sec-Fetch-Site: none is the key line. It says the browser classified this request as having no web page behind it, as if the user had typed the address directly.
  • Sec-Fetch-Mode: navigate describes the kind of request; the report does not explain why this value appears.
  • Sec-Fetch-Dest: empty describes what the browser expects to do with the response; empty means it does not expect to render it as a document or image, consistent with a download.
  • Referer: http://<ip-address>:8000/ is the address of the page that caused the request. It points at port 8000, the attacker page.
  • User-Agent: ... identifies the browser; the report elides the value.
  • The trailing ... and ===== are just the script's formatting.

The request goes to the PDF origin on port 8001 but was triggered from a different origin on port 8000. The Referer header still points at the embedding page, yet Sec-Fetch-Site is none rather than cross-site. That is the demonstration: the request is not classified as a cross-site request. The two headers contradict each other.

Root cause

In the browser process, PluginObserver::OpenPDF creates download::DownloadUrlParameters for the embedded PDF resource but never populates the initiator origin:

C++
// chromium/src/chrome/browser/plugins/plugin_observer.cc
void PluginObserver::OpenPDF(const GURL& url) {
  content::RenderFrameHost* render_frame_host =
      plugin_host_receivers_.GetCurrentTargetFrame();
  // WebViews should never trigger PDF downloads.
  if (extensions::WebViewGuest::FromRenderFrameHost(render_frame_host))
    return;

  content::Referrer referrer;
  if (!CanOpenPdfUrl(render_frame_host, url,
                     web_contents()->GetLastCommittedURL(), &referrer)) {
    return;
  }

  net::NetworkTrafficAnnotationTag traffic_annotation =
      net::DefineNetworkTrafficAnnotation("pdf_plugin_placeholder", R"(
        semantics {
          sender: "PDF Plugin Placeholder"
          description:
            "When the PDF Viewer is unavailable, a placeholder is shown for "
            "embedded PDFs. This placeholder allows the user to download and "
            "open the PDF file via a button."
          trigger:
            "The user clicks the 'View PDF' button in the PDF placeholder."
          data: "None."
          destination: WEBSITE
        }
        policy {
          cookies_allowed: NO
          setting:
            "This feature can be disabled via 'Download PDF files instead of "
            "automatically opening them in Chrome' in settings under content. "
            "The feature is disabled by default."
          chrome_policy {
            AlwaysOpenPdfExternally {
              AlwaysOpenPdfExternally: false
            }
          }
        })");
  std::unique_ptr<download::DownloadUrlParameters> params =
      std::make_unique<download::DownloadUrlParameters>(
          url,
          render_frame_host->GetRenderViewHost()
              ->GetProcess()
              ->GetDeprecatedID(),
          render_frame_host->GetRoutingID(), traffic_annotation);
  params->set_referrer(referrer.url);
  params->set_referrer_policy(
      content::Referrer::ReferrerPolicyForUrlRequest(referrer.policy));

  web_contents()->GetBrowserContext()->GetDownloadManager()->DownloadUrl(
      std::move(params));
}

Line by line, in plain words:

  • void PluginObserver::OpenPDF(const GURL& url) { declares a function called OpenPDF that takes the URL of the PDF to open. GURL is Chromium's class for a URL.
  • content::RenderFrameHost* render_frame_host = plugin_host_receivers_.GetCurrentTargetFrame(); finds the frame (the part of the page) that contains the placeholder. A RenderFrameHost is the browser-side handle for a frame.
  • if (extensions::WebViewGuest::FromRenderFrameHost(render_frame_host)) return; exits early if the frame belongs to an embedded WebView (used by Android apps). WebViews are not supposed to trigger PDF downloads.
  • content::Referrer referrer; declares a variable to hold the referrer information.
  • if (!CanOpenPdfUrl(render_frame_host, url, web_contents()->GetLastCommittedURL(), &referrer)) { return; } checks whether the URL is allowed to be opened from this page, and fills in the referrer if so. If not allowed, the function returns without doing anything.
  • net::NetworkTrafficAnnotationTag traffic_annotation = net::DefineNetworkTrafficAnnotation("pdf_plugin_placeholder", R"(...)"); creates a traffic annotation: a structured description of what the network request is for, used for privacy auditing and policy. The R"(...)" syntax is a raw string literal, so the text inside is taken literally. The annotation says the sender is the PDF Plugin Placeholder, the trigger is the user clicking the button, no data is sent, and cookies are not allowed.
  • std::unique_ptr<download::DownloadUrlParameters> params = std::make_unique<download::DownloadUrlParameters>(url, render_frame_host->GetRenderViewHost()->GetProcess()->GetDeprecatedID(), render_frame_host->GetRoutingID(), traffic_annotation); creates the download parameters. std::unique_ptr is a smart pointer that owns the object and frees it automatically. The constructor takes the URL, the process ID of the renderer, the routing ID of the frame, and the traffic annotation. Notice what is not passed: the initiator origin.
  • params->set_referrer(referrer.url); sets the Referer header value.
  • params->set_referrer_policy(content::Referrer::ReferrerPolicyForUrlRequest(referrer.policy)); sets the referrer policy, which controls how much of the referrer is sent.
  • web_contents()->GetBrowserContext()->GetDownloadManager()->DownloadUrl(std::move(params)); hands the parameters to the download manager, which starts the download. std::move transfers ownership of the pointer.

The key omission is that no call sets the initiator. The object is created, the referrer is set, and the download starts, but the initiator stays at its default, which is empty.

DownloadUrlParameters defaults the initiator to empty unless explicitly set, and CreateResourceRequest copies this value into the network::ResourceRequest that is sent to the network service:

C++
// chromium/src/components/download/internal/common/download_utils.cc
std::unique_ptr<network::ResourceRequest> CreateResourceRequest(
    DownloadUrlParameters* params) {
  DCHECK_GE(params->offset(), 0);

  std::unique_ptr<network::ResourceRequest> request(
      new network::ResourceRequest);
  request->method = params->method();
  request->url = params->url();
  request->request_initiator = params->initiator();
  request->trusted_params = network::ResourceRequest::TrustedParams();
  request->has_user_gesture = params->has_user_gesture();
  ...
}

Line by line:

  • std::unique_ptr<network::ResourceRequest> CreateResourceRequest(DownloadUrlParameters* params) { declares a function that turns download parameters into a network request.
  • DCHECK_GE(params->offset(), 0); is a debug-only assertion that the download offset is not negative. DCHECK checks are compiled out in release builds.
  • std::unique_ptr<network::ResourceRequest> request(new network::ResourceRequest); creates the network request object.
  • request->method = params->method(); copies the HTTP method (usually GET).
  • request->url = params->url(); copies the URL.
  • request->request_initiator = params->initiator(); copies the initiator. Because the initiator was never set, this copies an empty value.
  • request->trusted_params = network::ResourceRequest::TrustedParams(); sets up a structure for parameters that only the browser process is allowed to set.
  • request->has_user_gesture = params->has_user_gesture(); records whether the request was triggered by a user action such as a click.
  • The ... indicates the rest of the function is omitted.

In the network stack, the Fetch Metadata helper interprets a missing initiator origin on a browser-initiated request as a "no site" relation and maps it to Sec-Fetch-Site: none:

C++
// chromium/src/services/network/sec_header_helpers.cc
std::optional<net::OriginRelation> GetInitiatorRelation(
    const net::URLRequest& request,
    base::optional_ref<const GURL> pending_redirect_url,
    const mojom::URLLoaderFactoryParams& factory_params,
    const cors::OriginAccessList& origin_access_list) {
  // Browser-initiated requests with no initiator origin will send
  // `Sec-Fetch-Site: None`.
  if (!request.initiator().has_value()) {
    // CorsURLLoaderFactory::IsValidRequest verifies that only the browser
    // process may initiate requests with no request initiator.
    DCHECK(factory_params.process_id.is_browser());

    return std::nullopt;
  }
  const url::Origin& initiator = request.initiator().value();
  ...
}

Line by line:

  • std::optional<net::OriginRelation> GetInitiatorRelation(...) declares a function that works out the relationship between the request's initiator and the target. std::optional means the function may return "nothing" instead of a value.
  • The parameters are the request itself, an optional pending redirect URL, the factory parameters (which include the process ID), and an origin access list used for CORS checks.
  • if (!request.initiator().has_value()) { checks whether the initiator is missing.
  • DCHECK(factory_params.process_id.is_browser()); is a debug-only assertion that only the browser process may send requests with no initiator. This is the existing safety check.
  • return std::nullopt; returns "nothing", which the caller interprets as "no site" and turns into Sec-Fetch-Site: none.
  • const url::Origin& initiator = request.initiator().value(); is reached only when an initiator exists; the rest of the function compares origins.

The code comment states that browser-initiated requests with no initiator origin send Sec-Fetch-Site: none. The placeholder download breaks that assumption: it is a browser-process download, but it is indirectly driven by the embedding page, and the initiator is simply never recorded. A code comment notes that CorsURLLoaderFactory::IsValidRequest verifies that only the browser process may initiate requests with no request initiator. The Referer header is set from the placeholder's referrer.

Impact

Any web origin that can cause the browser to render the PDF plugin placeholder for an embedded cross-origin PDF, for example by embedding a PDF from a different host or port while PDF viewing is disabled, can trigger this behaviour. When a user clicks the placeholder's "Open" button, the browser initiates a download to the cross-origin PDF URL with Sec-Fetch-Site: none, even though the request was indirectly triggered by the embedding page.

Servers that rely on Fetch Metadata, and specifically on rejecting Sec-Fetch-Site: cross-site for sensitive download or export endpoints, may incorrectly treat these requests as if they were direct browser navigations without a web initiator. This allows an embedding site to drive a user's browser to access cross-origin PDF download or export endpoints that would otherwise be blocked by stricter Fetch Metadata-based policies, potentially undermining access control or CSRF-like protections that depend on accurate site relationship classification.

The report does not describe any further consequence beyond that misclassification.

In everyday terms: imagine a building where the front desk only lets in visitors who arrive on foot (no car), because those are assumed to be residents. A delivery driver who parks around the corner and walks in looks like a resident to the desk. The bug is the equivalent of that: a request that should be labelled "came from another website" is labelled "came from nowhere", and a server that trusts the label lets it through.

Fix

Variants to test

  1. Other browser-process downloads triggered from page content. Look for code paths that construct DownloadUrlParameters without calling the initiator setter, then check the resulting request's Sec-Fetch-Site. A positive result is a request to a cross-origin URL that carries Sec-Fetch-Site: none while the Referer shows the embedding page.
  2. Different cross-origin relationships. Repeat the PoC with a different host rather than a different port, and with a different scheme, and compare the header. A positive result is none where cross-site or same-site would be expected.
  3. Endpoints that gate on Fetch Metadata. Point the embedded resource at a download or export endpoint that rejects Sec-Fetch-Site: cross-site. A positive result is the endpoint serving the download when reached through the placeholder, where a direct cross-site request would be refused.
  4. Other placeholder or fallback UI. Check whether similar fallbacks for other embedded content types produce browser-initiated requests without an initiator. A positive result is the same Sec-Fetch-Site: none on a request that a page caused.

Glossary

  • API: an interface that lets one piece of software ask another to do something, like a menu of allowed operations.
  • Browser process: the central Chrome process that coordinates tabs, downloads, and communication between other processes.
  • Chrome Vulnerability Reward Program (Chrome VRP): Google's scheme that pays researchers for reporting security issues in Chrome.
  • Chromium: the open-source browser project that Chrome is built from.
  • Cookie: a small piece of data a website stores in your browser and that the browser sends back on later requests, often used to keep you logged in.
  • CORS (Cross-Origin Resource Sharing): a set of rules and headers that let a server decide whether a page from another origin may read its responses.
  • Cross-site request forgery (CSRF): an attack where a malicious site makes your browser send a request to another site using your existing session, without your intent.
  • DownloadUrlParameters: the Chromium object holding the settings for a download, including the URL and the initiator origin.
  • Embedding page: the page that includes content from another origin.
  • Fetch Metadata: a family of request headers (Sec-Fetch-*) that describe the context of a request, such as whether it is same-origin, cross-site, or browser-initiated.
  • Frame / RenderFrameHost: a part of a page (such as an iframe) and the browser-side object that represents it.
  • Header: a name/value pair sent with an HTTP request or response carrying extra information.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • Initiator origin: the origin of the page that caused a request; if empty, the request is treated as browser-initiated.
  • localhost: the hostname that refers to the machine you are using.
  • mojom: Chromium's interface definition language for communication between processes.
  • Network service: the separate Chrome process that performs network requests.
  • Origin: the combination of scheme, host, and port that identifies a web security boundary.
  • PDF: Portable Document Format, a file format for documents.
  • PDF plugin placeholder: the grey box with an "Open" button shown in place of an embedded PDF when the built-in viewer is unavailable.
  • Port: a number that identifies a specific service on a machine; different ports on the same host are different origins.
  • Referer header: a request header giving the address of the page that caused the request.
  • Sec-Fetch-Site: the Fetch Metadata header that states the relationship between the request's initiator and target (same-origin, same-site, cross-site, or none).
  • Sec-Fetch-Mode / Sec-Fetch-Dest: Fetch Metadata headers describing the kind of request and what the browser expects to do with the response.
  • Traffic annotation: a structured description in Chromium code of what a network request is for, used for auditing and policy.
  • User-Agent header: a request header identifying the browser and its version.
  • WebView: an embedded browser component used inside apps, which in this code is not allowed to trigger PDF downloads.

More by Povcfe

View all

6 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.