Skip to content
Business logic Write-up Beginner

How I Got Paid $0 From the India’s largest online gifting portal — Bug Bounty Program

The Android app sent the product price in plain text during checkout, and the server accepted a modified lower price without validation. An attacker could pay a much smaller amount than the listed price for a product.

Hariom Vashisth Follow

Published on medium.com

{{media:0}}

Hariom Vashisth, on medium.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

This is a short account of a price manipulation finding on what the author describes as India's largest online gifting portal. The target was the portal's Android mobile application, specifically its checkout and payment flow: the product purchase flow that takes a shopper from a chosen gift to a completed payment. The author does not name the company, the app version, or the payment gateway.

The author also notes that the website belonging to the vulnerable mobile application was not affected by the same issue.

Setup

  • The author was shopping through the Android app, not the website.
  • Traffic from the mobile app was passed through the author's laptop and a penetration testing tool acting as an interception proxy, so requests could be read and modified in plain text.
  • Notes were kept in Notepad++ while mapping the application's API flow.
  • No accounts, roles, versions or specific tool names are given beyond this.

Finding it

While browsing the gift catalogue, the author opened the console and started looking at XHR calls and source code, mapping the application's flow into what they describe as a complete API flow, or product purchase flow. During this mapping, something in the secure checkout method looked wrong, and the author decided to test it with a man-in-the-middle setup.

With the app's traffic intercepted, the checkout request contained a plain-text product_amount field. That field being readable and, more importantly, modifiable in transit is what raised the doubt.

The author was initially unsure about the impact of changing the value, but changed it anyway to understand what would happen.

Exploitation

Step 1: Intercept the checkout request

With the mobile app's traffic routed through the interception tool, the author captured the purchase request and found the product_amount parameter in plain text. The report does not reproduce the full request, the endpoint, the HTTP method, or any other parameters.

Step 2: Tamper with the amount and forward it

The author changed product_amount and forwarded the modified request to the server. The server processed the request successfully, without any validation of the amount.

Step 3: Complete the payment

The author expected a validation layer after payment, in the success and failure webhooks typically configured in a payment module, but the modified request was processed without any validation. The original price before changing was 725, and the author paid 1Rs.

Image for post
Image for post From the original on medium.com

The screenshot shows the original price of 725 before the change, alongside the 1Rs payment.

Root cause

The client-supplied product_amount was trusted by the server. The amount was sent in plain text from the app and the server accepted the modified value without validating it against the real price of the product. The author had thought validation might sit in the payment module's success and failure webhooks, but the modified request was processed without any validation. Whether the server ever recomputed the price from its own product data is not stated; the observable behaviour is that it did not enforce it on this request.

Impact

An attacker who can intercept and modify their own app traffic could buy a product at an arbitrary price: in this case 1Rs instead of 725. The author frames this as a serious vulnerability, price manipulation. The report does not describe mass exploitation, other users' orders, or any effect on the website, which the author says was free from this vulnerability.

Fix

The report does not say what the vendor changed, if anything. The evident fix is to stop trusting the client-supplied amount: the server should look up the product price from its own data and compute the charge from that, and the payment webhooks should verify the captured amount against the expected order total before fulfilling the order.

Variants to test

  1. Tamper with the amount field in checkout requests on other mobile apps and web checkouts. A positive result is an order completed at the modified price.
  2. Change quantity, currency, or discount parameters alongside the price. A positive result is a total that does not match the catalogue price times quantity.
  3. Replay a successful payment webhook or callback with a modified amount. A positive result is an order marked paid for an amount lower than the product price.
  4. Test whether the same tampering works on the website when it fails on the app, and vice versa. A positive result is one channel accepting a price the other rejects.

Timeline

  • April 15, 2018: report submitted and triaged.

The author notes that the report was submitted and a reply was awaited.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher was shopping through the Android mobile app of a gift shopping site, the kind of site where you buy presents for other people. While poking around, he noticed that when the app sent a purchase to the server, the price of the item travelled as plain, readable text. He changed that price to a much smaller number, sent the request on, and the server accepted it. He paid 1Rs for a product that originally cost 725. The report calls this price manipulation, and it was submitted to the company's bug bounty programme on April 15, 2018.

A bug bounty programme is a deal a company makes with outside researchers: find a security problem in our systems, tell us privately, and we may reward you. The title of the report jokes that the author got paid $0, and the text never describes a reward, so treat the outcome as unknown.

This article walks through the same steps the researcher took, explaining each idea from scratch. You only need to be comfortable using a browser and a computer.

The target and the flow being tested

The target was the Android app of what the author calls India's largest online gifting portal. A portal here just means a shopping site. The part under test was the checkout and payment flow: the sequence of steps that takes a shopper from picking a gift to paying for it.

A flow is simply the path a user follows through an application. Think of a supermarket: you pick items, go to the till, the cashier scans them, you pay, you get a receipt. Online, each of those stages is a separate request between your app and the company's computers.

An API is the set of doors a program uses to talk to a server. When the app shows you a product and a price, it is not inventing that price; it asked the server for it. When you press pay, the app sends another request. An API flow is the ordered list of those requests. Understanding it is like knowing which counters to visit in a government office: once you know the order, you know where to stand to watch what happens.

The author does not name the company, the app version, or the payment gateway. A payment gateway is the outside service that actually moves money from a card or bank account to the shop.

One more detail from the report: the website belonging to the same company was not affected by this issue. Only the mobile app was.

Setting up to watch the traffic

To see what an app sends, you have to put something between the app and the internet that can read and change the messages. That is what the author did:

  1. He shopped through the Android app, not the website.
  2. He routed the app's traffic through his laptop, where a penetration testing tool acted as an interception proxy.
  3. He kept notes in Notepad++ while mapping the application's API flow.

A proxy is a middleman. Instead of the app talking straight to the shop's server, it talks to the proxy, and the proxy passes the message on. A postal redirect works the same way: you address a letter to a friend, but it goes via an office that opens it, reads it, maybe rewrites a line, and sends it onward. An interception proxy does exactly this with network requests, and it lets the person in the middle read and edit them.

Penetration testing tool is the general name for software built for this kind of inspection. The report does not name the specific tool.

Notepad++ is a free text editor. The author used it to write down each request he saw, so he could piece together the full purchase flow.

Finding the weak point

While browsing the gift catalogue, the author opened the console and started looking at XHR calls and source code.

The console is a panel built into browsers where you can see messages a page exchanges behind the scenes. XHR stands for XMLHttpRequest, a browser mechanism for fetching data from a server without reloading the page. When a shop page updates a price or checks stock without you clicking anything, an XHR call is often what did it. Watching XHR calls is like standing behind the till and watching each item being scanned: you see the individual transactions instead of just the final receipt.

Source code is the human-written instructions behind a page. Reading it can reveal how the app is put together and which requests it makes.

By combining what he saw in the console with his notes, the author built up a picture of the complete API flow, which he also calls the product purchase flow. During this mapping, something about the secure checkout method looked wrong. Secure checkout is the part of the flow meant to protect the payment step. He decided to test his suspicion with a man-in-the-middle test.

A man-in-the-middle (MITM) test, in this context, means placing yourself between the app and the server so you can read and alter the messages. It is the same idea as the proxy above; the name emphasises that you sit in the middle of the conversation.

With the app's traffic intercepted, the checkout request contained a plain-text product_amount field. Plain text means the value was readable as-is, not scrambled. A field is one named piece of data inside a request, like one box on a form. product_amount is the box holding the price the app is telling the server to charge.

That the field was readable, and more importantly editable while in transit, is what raised the doubt. If the price is decided by the app and merely passed along, then whoever controls the app's traffic can decide the price too.

The author was not sure what changing the value would do, but changed it anyway to find out. That is a reasonable instinct in testing: you cannot know whether a check exists until you try to break it.

Exploitation

Step 1: Intercept the checkout request

With the app's traffic routed through the interception tool, the author captured the purchase request and found the product_amount parameter in plain text. A parameter is the same thing as a field: a named value carried in a request. The report does not reproduce the full request, the endpoint, the HTTP method, or any other parameters. The endpoint is the address the request is sent to, and the HTTP method is the type of action being asked for, such as fetching data or submitting an order.

Step 2: Tamper with the amount and forward it

The author changed product_amount and forwarded the modified request to the server. Forwarding means letting the proxy send the edited message on to its destination, as if it were the original.

The server processed the request successfully, without any validation of the amount. Validation means checking that a value makes sense before acting on it. A till assistant who accepts a handwritten price tag without checking it against the shelf is doing no validation. Here, the server took the number the app supplied and used it.

Step 3: Complete the payment

The author expected a validation layer after payment, in the success and failure webhooks typically configured in a payment module, but the modified request was processed without any validation.

A webhook is an automatic message one system sends to another when something happens. In payments, the gateway sends a webhook to the shop saying this payment succeeded or this payment failed. A payment module is the part of the shop's software that handles those messages. The author's reasoning was: even if the checkout step trusts the app, surely the payment step compares the amount actually paid with the real price. It did not, at least not in a way that stopped this order.

The original price before changing was 725, and the author paid 1Rs. Rs is the rupee, the currency of India.

Image for post
Image for post From the original on medium.com

The screenshot shows the original price of 725 before the change, alongside the 1Rs payment.

Why it worked

The client-supplied product_amount was trusted by the server. Client here means the app on the shopper's device; server means the company's computer that processes the order. The amount was sent in plain text from the app, and the server accepted the modified value without checking it against the real price of the product.

The author had thought validation might sit in the payment module's success and failure webhooks, but the modified request was processed without any validation. Whether the server ever recomputed the price from its own product data is not stated. What was observed is that it did not enforce the real price on this request.

A useful way to remember the principle: never let the customer write the price on the receipt. The shop's own records should decide what an item costs.

Impact

Someone who can intercept and modify their own app traffic could buy a product at an arbitrary price: in this case 1Rs instead of 725. The author calls this a serious vulnerability, price manipulation. The report does not describe mass exploitation, other users' orders, or any effect on the website, which the author says was free from this vulnerability.

Fix

The evident fix is to stop trusting the amount supplied by the app: the server should look up the product price from its own data and compute the charge from that. The payment webhooks should also verify the captured amount against the expected order total before the order is fulfilled.

Variants to test

  1. Tamper with the amount field in checkout requests on other mobile apps and web checkouts. A positive result is an order completed at the modified price.
  2. Change quantity, currency, or discount parameters alongside the price. A positive result is a total that does not match the catalogue price times quantity.
  3. Replay a successful payment webhook or callback with a modified amount. A positive result is an order marked paid for an amount lower than the product price.
  4. Test whether the same tampering works on the website when it fails on the app, and vice versa. A positive result is one channel accepting a price the other rejects.

Timeline

  • April 15, 2018: report submitted and triaged.

Triaged means the company reviewed and categorised the report. The author notes that the report was submitted and a reply was awaited; the bounty outcome is not described in the text.

Glossary

  • API: the set of requests a program uses to talk to a server, and the rules for them.
  • API flow: the ordered sequence of requests an application makes to complete a task, such as a purchase.
  • Bug bounty programme: a scheme where a company invites outside researchers to report security problems, often for a reward.
  • Checkout: the part of a shop where an order is confirmed and paid for.
  • Client: the software on the user's device, such as the mobile app.
  • Console: a panel in a browser that shows behind-the-scenes messages and lets you inspect a page.
  • Endpoint: the address a request is sent to.
  • Field: one named piece of data inside a request.
  • Flow: the path a user or a set of requests follows through an application.
  • HTTP method: the type of action a request asks for, such as fetching data or submitting an order.
  • Interception proxy: a middleman that sits between an app and a server and can read and edit the traffic.
  • Man-in-the-middle (MITM) test: placing yourself between two parties in a conversation so you can read and alter the messages.
  • Parameter: a named value carried in a request; the same as a field.
  • Payment gateway: an outside service that moves money between a shopper and a shop.
  • Payment module: the part of a shop's software that handles payment messages.
  • Penetration testing tool: software built for inspecting and testing the security of applications and networks.
  • Plain text: data that is readable as-is, not scrambled.
  • Price manipulation: changing the price a system charges so that it differs from the real price.
  • Product purchase flow: the sequence of steps and requests that takes a shopper from choosing a product to paying for it.
  • Proxy: a middleman that passes messages between two parties.
  • Secure checkout: the part of a checkout meant to protect the payment step.
  • Server: the company's computer that receives and processes requests.
  • Source code: the human-written instructions behind a page or program.
  • Tamper: to change data in transit or at rest without authorisation.
  • Triaged: reviewed and accepted as a genuine issue by the receiving company.
  • Validation: checking that a value makes sense before acting on it.
  • Webhook: an automatic message one system sends to another when an event happens, such as a payment succeeding.
  • XHR (XMLHttpRequest): a browser mechanism for fetching data from a server without reloading the page.

More by Hariom Vashisth

View all

1 more disclosed report, best first.

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.