CWE-472Spend & resource abuseSeverity · High

Prices sent by the client

When the checkout request carries the price, a buyer can edit it before sending. The server then charges whatever amount it receives, down to nothing.

At a glance

Controls
CWE-472 · A04:2021 Insecure Design
Typical severityHigh
ReferenceCWE-472
OWASP Top 10A04:2021 Insecure Design

What it is

Some checkouts send the item price, discount or total from the browser or app. The server passes that number to the payment step. The amount is under the buyer's control.

An attacker intercepts the request and lowers the price, changes the currency or sets the total to a small value. AI-assisted tools flag any money field in a request as a target, so these fields are tested early.

Where it hides

What a reviewer can look for in the code and in the behaviour, before anyone proves it.

  • Create-order and create-checkout-session endpoints
  • Hidden form fields and mobile app request bodies
  • Add-on, upgrade and proration calculations
  • Currency and tax fields in the request

How MATT tests it

The proof runs against the deployed product, on every release, whoever wrote the code.

  1. 01Sign in with the test account and start a test-mode checkout.
  2. 02Resend the checkout request with a lower price or total field.
  3. 03Compare the amount on the created payment with the catalogue price.
The rule, in plain English

Prices and totals must be computed on the server.

Executable check

as test user: POST /v1/checkout {"sku": "X", "price": 1} expect: 400, or the price field is ignored expect: amount charged equals the server catalogue price for X expect: currency equals the account's configured currency

Every rule MATT holds →

What the fix looks like

  1. 01

    Send only item IDs and quantities from the client.

  2. 02

    Look up prices, discounts, tax and currency on the server.

  3. 03

    Compute the total on the server and pass it to the payment provider.

  4. 04

    Reject requests that include price fields the server does not expect.

A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →

ExploitOps discovery call

Understand where your security loop breaks.

A call with a MATT co-founder to understand your product and whether an ExploitOps Review is worth doing. If there is a real need, we scope one with the research team.

Let’s understand your priority

What brings you to MATT?

What would you like help with?
01 / 02