Skip to content
IDOR Write-up Intermediate

I’m Lovin’ It: Exploiting McDonald’s APIs to hijack deliveries and order food for a penny

The McDelivery India web app used sequential order IDs and accepted guest tokens, so anyone could read other customers' order details, track drivers in real time, download invoices and post feedback. A mass-assignment flaw let a user change item prices in the cart before the server signed the order, allowing a large order to be paid for one rupee, and a timed request could redirect another person's order to a different address.

eaton-works.com

Published on eaton-works.com

Want to watch a video version? Check out this great video by LowLevelTV covering this disclosure.

Eaton, on eaton-works.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the APIs checked that a valid token existed but not that the token's owner matched the requested order, and the cart update endpoint accepted fields such as price that clients should never control.

Impact

An attacker could read other customers' order and driver data, download invoices, post fake feedback, view admin KPI reports, pay a tiny amount for a large order, and redirect or take over another person's in-progress order, though the redirect only worked while the order was in a narrow early state.

What the attacker needed

No account needed for order data; a free account for checkout; victim order in initiated or pending state; careful timing of requests

The fix

The issues were fixed after the report, with the vendor confirming all reported issues were resolved.

How it was found

  1. Open the order-tracking route with a small order ID and a guest token to view another user's order status and location.
  2. Increment the order ID to reach other orders, including ones still on the way, and read driver details.
  3. Use the invoice link and a second invoice API with other order IDs to download their invoices.
  4. Create an account through the undocumented user creation API and log in via the hidden password page.
  5. Send a PUT request to the cart to change an item's price, then check out and confirm the signed order carries the low price.
  6. With two accounts, change the victim's order address to your own while it is in the initiated or pending state, then optionally reassign the order to your account.

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 write-up has not been written yet. The Original tab links to the source.

The app trusted the order number in the web address and never checked that the order belonged to the person asking. Because order numbers simply count up, anyone could change the number and see someone else's order, driver location and invoice. Separately, the app let a customer change the price of items in their basket before the payment total was locked in, so the total could be made tiny.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.