At a glance
- Controls
- CWE-472 · A04: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.
- 01Sign in with the test account and start a test-mode checkout.
- 02Resend the checkout request with a lower price or total field.
- 03Compare the amount on the created payment with the catalogue price.
Prices and totals must be computed on the server.
Executable checkas 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
- 01
Send only item IDs and quantities from the client.
- 02
Look up prices, discounts, tax and currency on the server.
- 03
Compute the total on the server and pass it to the payment provider.
- 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? →