Insufficient validation of untrusted input in Payments (CVE-2026-17955)
A logic error in Secure Payment Confirmation's logo truncation allowed a merchant to include extra payment logos in the signed clientDataJSON that were never displayed to the user. This could mislead a relying party into believing the user saw and consented to logos that were hidden.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A logical flaw in Secure Payment Confirmation (SPC) allows a potential attacker to include unshown payment logos in the cryptographically signed clientDataJSON payload. The browser attempts to cap the logo array size to two elements but uses a single-iterator std::vector::erase, which only removes one element. These extra elements are subsequently signed by the WebAuthn credential without ever being displayed to the user.
Affected files:
components/payments/content/secure_payment_confirmation_app_factory.cccomponents/payments/content/secure_payment_confirmation_app.cccontent/browser/webauth/client_data_json.ccchrome/browser/ui/views/payments/secure_payment_confirmation_dialog_view.cccomponents/payments/content/android/spc/java/src/org/chromium/components/payments/secure_payment_confirmation/SecurePaymentConfirmationViewBinder.java
Estimated timestamp from git blame: 2025-06-06
Root Cause
In SecurePaymentConfirmationAppFactory::Create, the browser attempts to restrict the renderer-supplied payment_entities_logos vector to a maximum of two entries. However, on lines 184–187, it incorrectly uses the single-iterator overload of std::vector::erase, which only deletes exactly one element instead of truncating all elements from that point onward:
// components/payments/content/secure_payment_confirmation_app_factory.cc:184-187
if (spc_request->payment_entities_logos.size() > 2) {
spc_request->payment_entities_logos.erase(
spc_request->payment_entities_logos.begin() + 2);
}
For an input vector of length $N \ge 4$ (e.g. [L0, L1, L2, L3]), this operation results in [L0, L1, L3], which retains $N - 1 = 3$ elements and completely preserves elements at index 3 and above. No other size validation boundaries or IDL array limits are enforced in the pipeline to restrict the array length.
Potential Vulnerability Mechanism
- Triggering the Request: A page initiates an SPC payment flow via the
PaymentRequestAPI containing four or more logos inpaymentEntitiesLogos(e.g.,[L0, L1, L2, L3]). - Defective Truncation: The request passes browser-side validation. The defective
eraseis executed, which erases onlyL2. This leaves a vector of size 3:[L0, L1, L3]. - UI Rendering (Omission of Indices $\ge 2$):
- Desktop UI (
secure_payment_confirmation_dialog_view.cc): Explicitly renders only the logos at index 0 and index 1. Any logo at index 2 or higher is silently dropped from the display. - Android UI (
SecurePaymentConfirmationViewBinder.java): Only displays the primary (index 0) and secondary (index 1) logos. Although there is an assertionassert (logos.size() == 2);, Java assertions compile out in release builds, enabling the execution to proceed silently.
- Desktop UI (
- Signing Path: After the user approves and completes authentication, all elements stored in
payment_entities_logos_(including the hidden logos at indices $\ge 2$) are mapped intoShownPaymentEntityLogoMojom structures, serialized into thepaymentEntitiesLogosarray within theclientDataJSONblock insidecontent/browser/webauth/client_data_json.cc, and cryptographically signed.
Potential Impact
This constitutes a potential direct violation of Secure Payment Confirmation's What-You-See-Is-What-You-Sign (WYSIWYS) integrity guarantee. A malicious merchant could present the user with two benign logos while smuggling additional, arbitrary {url, label} pairs into the signed payment evidence. Since the verifying Relying Party relies on the signed clientDataJSON as browser-attested proof of what transaction details the user actually saw, they will be misled into believing the user consented to/saw logos and labels that were completely hidden from view.
Potential Reproduction Steps
-
On a web page with an enrolled SPC credential, execute the following script:
JavaScript const req = new PaymentRequest([{ supportedMethods: 'secure-payment-confirmation', data: { rpId: 'rp.example', credentialIds: [knownId], challenge: new Uint8Array([1]), instrument: {displayName: 'Card', icon: 'https://rp.example/card.png'}, payeeOrigin: 'https://merchant.example', paymentEntitiesLogos: [ {url: 'https://a/benign1.png', label: 'Visa'}, {url: 'https://a/benign2.png', label: 'Bank'}, {url: 'https://a/x.png', label: 'erased-by-bug'}, {url: 'https://a/hidden.png', label: 'HIDDEN-NOT-SHOWN'} ] } }], {total: {label: 'Total', amount: {currency: 'USD', value: '1.00'}}}); const resp = await req.show(); -
Observe that the SPC confirmation dialog displays only 'Visa' and 'Bank'.
-
Authenticate and complete the payment flow.
-
Decode the returned
resp.details.response.clientDataJSON. Note that thepaymentEntitiesLogosarray contains three entries, including theHIDDEN-NOT-SHOWNlogo (https://a/hidden.png), cryptographically signed as if it were displayed to the user.
(Note: Our tooling agent doesn't yet have the ability to run code, and these reproduction steps are suggested/potential steps.)
Suggested Fix
Modify SecurePaymentConfirmationAppFactory::Create in components/payments/content/secure_payment_confirmation_app_factory.cc to use the range-based erase overload to remove all elements from index 2 to the end of the vector:
if (spc_request->payment_entities_logos.size() > 2) {
spc_request->payment_entities_logos.erase(
spc_request->payment_entities_logos.begin() + 2,
spc_request->payment_entities_logos.end());
}
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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.
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 code used a single-iterator vector erase instead of a range erase, so it removed only one element rather than truncating the logo list to two entries.
Impact
A malicious merchant could smuggle hidden logo and label pairs into the signed payment evidence, violating the what-you-see-is-what-you-sign guarantee and potentially misleading the relying party about what the user actually saw.
What the attacker needed
Enrolled SPC credential; user completes payment flow
The fix
The code should use the range-based erase overload to remove all elements from index 2 to the end of the vector.
How it was found
- On a page with an enrolled SPC credential, call PaymentRequest with four or more paymentEntitiesLogos entries.
- Observe that the confirmation dialog shows only the first two logos.
- Authenticate and complete the payment flow.
- Decode the returned clientDataJSON and note that the hidden logo is present and signed.
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.
Secure Payment Confirmation is a browser feature that lets you approve a payment with a fingerprint or face scan, and the browser signs a record of what you saw. This report found that a merchant could sneak extra logos into that signed record without them appearing on screen. The signature would then falsely suggest you had seen those logos.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.