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

Insufficient validation of untrusted input in Payments (CVE-2026-17747)

A compromised renderer hosting a service worker can send a message to open a payment handler window, and on Android the fallback path loses the caller's identity and attaches the attacker's URL to the active payment flow. This could let the attacker display a phishing page in the Payment Handler BottomSheet instead of the legitimate payment app.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 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 without the security team.

Overview: A compromised renderer hosting any service worker can potentially hijack an active Payment Handler BottomSheet on Android to display an attacker-controlled page. This occurs because the fallback mechanism for opening payment handler windows on Android loses the caller's identity and blindly attaches the requested URL to a process-wide static singleton representing the active payment flow.

Affected files:

  • components/payments/content/android/java/src/org/chromium/components/payments/PaymentRequestService.java
  • content/browser/service_worker/service_worker_version.cc
  • chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java
  • chrome/android/java/src/org/chromium/chrome/browser/payments/handler/PaymentHandlerCoordinator.java

Estimated timestamp from git blame: 2025-04-22

Description

On Android, a security vulnerability exists where a compromised renderer can inject an attacker-controlled page into the Payment Handler BottomSheet for an unrelated, in-progress payment flow. This is a confused-deputy issue resulting from a lack of caller authorization checks and the loss of context during a C++ to Java JNI transition.

Root Cause

The vulnerability stems from a sequence of gaps in validation and routing:

  1. Missing Authorization Check in C++: When a renderer sends the blink::mojom::ServiceWorkerHost::OpenPaymentHandlerWindow Mojo message, ServiceWorkerVersion::OpenPaymentHandlerWindow (service_worker_version.cc) only validates that the requested URL is same-origin with the calling Service Worker. Crucially, it does not verify if the calling Service Worker is actually authorized to interact with the current payment flow (e.g., by checking if it has a pending PaymentRequestEvent).

  2. Android Fallback and Identity Loss: PaymentHandlerSupport::ShowPaymentHandlerWindow attempts to call ChromeContentBrowserClient::ShowPaymentHandlerWindow. On Android, this method explicitly returns false. This triggers a fallback mechanism in ShowPaymentHandlerWindowReplier::~ShowPaymentHandlerWindowReplier, which routes the request to ServiceWorkerVersion::OpenWindow with a NEW_POPUP disposition. This request is eventually routed to JNI via ServiceTabLauncher::LaunchTab. During this transition, the identity of the calling Service Worker is lost.

  3. Blind Dispatch in Java: In Java, ServiceTabLauncher.launchTab receives the NEW_POPUP request and blindly calls the static method PaymentRequestService.openPaymentHandlerWindow(url).

  4. Process-Global Singleton Hijack: PaymentRequestService.openPaymentHandlerWindow(url) retrieves the currently active payment flow from a process-wide static singleton (BrowserGlobalPaymentFlowManager.sShowingPaymentRequest). It then attaches the attacker-provided url to this active flow without verifying that the URL's origin matches the origin of the legitimately invoked payment app (mInvokedPaymentApp).

Potential Attack Scenario

Note: These are suggested steps; our tooling agent does not yet have the ability to run code.

  1. An attacker compromises a renderer process (e.g., via a v8 exploit) and controls a Service Worker at attacker.example.
  2. A victim initiates a legitimate PaymentRequest on merchant.example and selects a legitimate payment app (e.g., bank.example).
  3. The browser begins the invocation process, setting mInvokedPaymentApp to bank.example and storing the active flow in BrowserGlobalPaymentFlowManager.sShowingPaymentRequest.
  4. The compromised renderer sends the OpenPaymentHandlerWindow Mojo IPC with the URL https://attacker.example/phish.
  5. The browser process validates the URL is same-origin with the attacker's Service Worker and routes the request through the Android fallback mechanism.
  6. ServiceTabLauncher calls PaymentRequestService.openPaymentHandlerWindow, which attaches the attacker's phishing URL to the victim's active payment flow.
  7. The Payment Handler BottomSheet opens, displaying the attacker's phishing page instead of the intended bank.example interface.

Because sShowingPaymentRequest is process-wide, this could potentially allow an attacker in a regular profile to hijack a payment flow in an Incognito profile if they occur concurrently.

(Note: Exploitation requires a timing constraint to ensure the Mojo IPC arrives after mInvokedPaymentApp is set, otherwise a Java NullPointerException occurs due to an assert in PaymentRequestService.java:648.)

Suggested Fix

  1. C++ Validation: In ServiceWorkerVersion::OpenPaymentHandlerWindow (or at the PaymentRequestEvent dispatch level), verify that the calling Service Worker actually has a pending PaymentRequestEvent and is the currently authorized handler for an active payment request before proceeding.
  2. Java Validation: In PaymentRequestService.openPaymentHandlerWindow, add a strict check to ensure that the origin of the provided url matches the origin (or scope) of mInvokedPaymentApp before opening the window.

Evaluated with Chrome root at commit: 137d451a126685dd5010e6609db9f6d4a78d8234


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.

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

Likely the code only checks that the requested URL is same-origin with the calling service worker, but does not verify that the service worker is authorised to interact with the current payment flow, and the Android fallback loses the caller's identity before attaching the URL to a process-wide singleton.

Impact

The Payment Handler BottomSheet could display the attacker's phishing page instead of the intended bank interface, and because the singleton is process-wide, an attacker in a regular profile could potentially hijack a concurrent payment flow in an Incognito profile; exploitation requires a timing constraint to avoid a null pointer exception.

What the attacker needed

Compromised renderer process; victim initiates a payment request; timing constraint for the IPC

The fix

The fix should add a check in C++ that the calling service worker has a pending PaymentRequestEvent and is the authorised handler, and a check in Java that the URL's origin matches the invoked payment app's origin.

How it was found

  1. An attacker compromises a renderer process and controls a service worker at attacker.example.
  2. A victim initiates a legitimate PaymentRequest on merchant.example and selects a legitimate payment app such as bank.example.
  3. The browser sets mInvokedPaymentApp to bank.example and stores the active flow in BrowserGlobalPaymentFlowManager.sShowingPaymentRequest.
  4. The compromised renderer sends the OpenPaymentHandlerWindow Mojo IPC with the URL https://attacker.example/phish.
  5. The browser validates the URL is same-origin with the attacker's service worker and routes the request through the Android fallback mechanism.
  6. ServiceTabLauncher calls PaymentRequestService.openPaymentHandlerWindow, which attaches the attacker's phishing URL to the victim's active payment flow.

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 service worker is a script that runs in the background for a website. The payment handler is the pop-up that shows your bank's payment interface. The bug means a malicious service worker could make that pop-up show the attacker's page instead of your bank's, which could trick you into entering payment details.

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.