Unique Case for Price Manipulation | BugBounty | VAPT
The e-commerce application validated only the number of digits in the price, not the actual value, so an attacker could change a three-digit price to a one-digit price and pay far less. The author confirmed that the payment gateway accepted the manipulated amount and issued an OTP for the reduced price.
Published on medium.com
Infosec
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.
Context
This is a write-up about a price manipulation issue found in an E-Commerce web application. Price manipulation is the test case for price tampering: the usual approach is to change the amount of a product (shoes, a t-shirt, a flight ticket) from Rs.XXXX or $XXXX down to Rs 1 or $1, and sometimes to change the currency format, for example from Dollar to INR.
The author states up front that the case described here is not one of those. The report deliberately contains no POCs, requests or responses; the author offers to discuss details over Twitter or LinkedIn instead.

Setup
The report does not describe the target application, the account used, the roles involved, or any tool versions. The only tool named is Burp Suite, where the request was modified before being forwarded to the payment gateway. The researcher had a payment card available and was able to receive OTPs for the payment step.
Finding it
The researcher tried the standard cases first and got nowhere:
- Changing the product's original amount value to 1 returned an error.
- Changing the currency format, for example Dollar to INR, was also unsuccessful.
After a break, the researcher came back with a different idea and tried it against the same application.


Exploitation
Step 1: change a three-digit price to a different three-digit price
A product priced at a three-digit value, $999, had its request intercepted in Burp Suite. The value was changed to $100 and the request was forwarded to the payment gateway. The gateway displayed $100 as the amount to be paid. The researcher used a card and received an OTP for paying $100, and realised the attempt had succeeded. The payment was not completed, because $100 was too much to pay if a price manipulation vulnerability existed.
Step 2: keep the digit count, change the value
The researcher tried again, this time changing 999 to 001. The payment gateway showed $1, the card was used, and an OTP for paying $1 arrived.
Step 3: apply the same trick to a four-digit price
A product with a four-digit dollar price was bought at $1 by changing the amount value from 9999 to 0001.

Root cause
The server side did validate the amount, but it validated the number of digits of the amount rather than the amount value itself. A three-digit price therefore had to stay three digits, and a four-digit price had to stay four digits, while the value itself was not checked. Changing 999 to 001 or 9999 to 0001 satisfied the check while reducing the price to $1.
Impact
An attacker who can modify the purchase request can pay a token amount for a product whose real price has the same number of digits, as demonstrated with a three-digit and a four-digit price. The report does not describe any limit on how many times this could be repeated, nor any check that would have caught it. The author notes that the $100 attempt was not completed, so the confirmation rests on the gateway showing the modified amount and issuing an OTP for it, and on the $1 purchases.
Fix
The implication of the root cause is that the server should validate the amount against the product's actual price rather than against the number of digits in the submitted value.
Variants to test
- Submit a price with the same digit count but a lower value, for example 999 to 001 or 9999 to 0001, and check whether the payment gateway displays the reduced amount and issues an OTP for it. A positive result is the gateway showing the modified amount rather than the original price.
- Try the same digit-width trick on prices of other lengths, since the validation described here is tied to digit count. A positive result is any accepted value that keeps the width but lowers the price.
- Combine the width trick with a currency change, since currency switching alone failed here. A positive result is a gateway amount lower than the product price after both changes.
- Test whether the validation is applied to the amount field only, or also to quantities and totals, and whether a request that passes the digit check is later re-priced by the server. A positive result is a final charge that differs from the product price.
What happened, in plain words
Imagine you are buying a t-shirt online. The website says it costs $999. When you click "Buy", your browser sends a message to the website's server saying, in effect, "I want this t-shirt and I will pay $999." The server then passes that message to a payment gateway, which is the service that actually handles your card payment. The payment gateway shows you the amount you are about to pay, and if you agree, it sends a one-time password (OTP) to your phone to confirm the payment.
Now imagine you could catch that message, like intercepting a letter before it reaches its destination. You open the letter, change "$999" to "$001", and send it on its way. If the server simply trusts the number in the letter, the payment gateway will show $1 instead of $999. That is price manipulation: tampering with the price that is sent to the server so that you pay less than you should.
In this report, the researcher found a twist. The server did check the price, but it only checked how many digits the price had, not what the digits were. So a three-digit price like 999 had to stay three digits, but any three-digit number was accepted. Changing 999 to 001 kept three digits and slipped past the check. The same worked for a four-digit price: 9999 became 0001. The researcher confirmed this by seeing the payment gateway show the reduced amount and by receiving an OTP for it, and by buying products at $1.
This write-up explains that finding step by step, for someone who has never done security testing before. It covers what price manipulation is, how the researcher tried the usual tricks, how the idea came about, and how the trick was pulled off. The report deliberately leaves out the exact requests and responses, so we will not invent them. We will use the same numbers that appear in the original and explain them in plain words.

Background: what is price manipulation?
Price manipulation is a type of vulnerability where an attacker changes the price of a product during the buying process. The goal is to pay less than the advertised price. This falls under a broader category called price tampering, which is any unauthorised change to price-related data.
In a normal online purchase, the price you see on the product page is sent to the server when you add the item to your cart or proceed to checkout. The server is supposed to verify that the price is correct before charging you. If the server trusts the price sent by the browser without checking it against the real price in its database, an attacker can modify that price.
Common ways penetration testers (security professionals who test systems for weaknesses) try to find price manipulation are:
- Changing the amount value directly. For example, if a product costs Rs. 5000 or $5000, they change it to Rs. 1 or $1.
- Changing the currency format. For example, switching from Dollar to INR, hoping the server will misinterpret the amount (like treating 5000 INR as 5000 USD, or vice versa, or applying a wrong conversion).
The researcher in this report tried both of these standard approaches and they did not work. Changing the amount to 1 gave an error, and changing the currency format gave no success. So the researcher had to think of something different.

The setup
The report does not describe the target application, the account used, the roles involved, or any tool versions. The only tool named is Burp Suite, which is a popular tool used by security testers to intercept and modify web traffic between a browser and a server. Think of it as a proxy that sits between your browser and the internet, allowing you to see and change the messages that go back and forth.
The researcher also had a payment card available and was able to receive OTPs (one-time passwords) for the payment step. An OTP is a short code sent to your phone or email to confirm a transaction, adding an extra layer of security.
Finding the vulnerability
The researcher started by trying the usual price manipulation techniques:
- Changing the product's original amount value to 1. This means taking the price, say $999, and replacing it with $1. The application returned an error, so this did not work.
- Changing the currency format, for example from Dollar to INR. This also did not work.
After these failed attempts, the researcher took a break, had a coffee, and then had a new idea. The idea was to change the price to a different value that still had the same number of digits. For example, instead of changing 999 to 1 (which reduces the number of digits from three to one), change it to 001 (which keeps three digits but is a much smaller value). The researcher then tried this against the same application.

Exploitation step by step
Step 1: change a three-digit price to another three-digit price
The researcher found a product priced at $999, a three-digit value. Using Burp Suite, the request was modified. The value was changed from 999 to 100, and the request was forwarded to the payment gateway. The payment gateway then displayed $100 as the amount to be paid. The researcher used a card and received an OTP for paying $100. The researcher realised the attempt had succeeded. However, the payment was not completed because $100 was too much to pay if a price manipulation vulnerability existed.
Step 2: keep the digit count, change the value
The researcher tried again, this time changing 999 to 001. The payment gateway showed $1, the card was used, and an OTP for paying $1 arrived. This confirmed that the price could be reduced to $1 as long as the number of digits stayed the same (three digits).
Step 3: apply the same trick to a four-digit price
A product with a four-digit dollar price was bought at $1. The researcher changed the amount value from 9999 to 0001, and the product was bought for $1.

Why it worked: the root cause
The server did validate the amount, but it validated the number of digits of the amount rather than the amount value itself. In other words, the server checked that the price had three digits for a three-digit product, or four digits for a four-digit product, but it did not check that the price was the correct value. So the number of digits had to match, while the value itself was not checked. Changing 999 to 001 or 9999 to 0001 satisfied the digit-count check while reducing the price to $1.
This is like a bouncer at a club who only checks that you are wearing a shirt, but not that the shirt is the right one. You can wear any shirt and still get in.
Impact
An attacker who can modify the purchase request can pay a token amount for a product whose real price has the same number of digits. The researcher demonstrated this with a three-digit price and a four-digit price. The report does not describe any limit on how many times this could be repeated, nor any check that would have caught it. The author notes that the $100 attempt was not completed, so the confirmation rests on the payment gateway showing the modified amount and issuing an OTP for it, and on the $1 purchases.
How to fix it
The implication of the root cause is that the server should validate the amount against the product's actual price rather than against the number of digits in the submitted value. In other words, the server should look up the real price from its database and compare it to the submitted price, and reject any mismatch.
Variants to test
If you want to look for similar issues, here are some ideas based on what was learned:
- Submit a price with the same digit count but a lower value, for example 999 to 001 or 9999 to 0001, and check whether the payment gateway displays the reduced amount and issues an OTP for it. A positive result is the gateway showing the modified amount rather than the original price.
- Try the same digit-width trick on prices of other lengths, since the validation described here is tied to digit count. A positive result is any accepted value that keeps the width but lowers the price.
- Combine the width trick with a currency change, since currency switching alone failed here. A positive result is a gateway amount lower than the product price after both changes.
- Test whether the validation is applied to the amount field only, or also to quantities and totals, and whether a request that passes the digit check is later re-priced by the server. A positive result is a final charge that differs from the product price.
Glossary
- Price manipulation: Changing the price of a product during a transaction to pay less than the intended amount.
- Price tampering: A broader term for any unauthorised modification of price-related data.
- Penetration tester: A security professional who tests systems for vulnerabilities by simulating attacks.
- Burp Suite: A tool used to intercept, inspect, and modify HTTP traffic between a browser and a server.
- Payment gateway: A service that processes credit card payments online, acting as an intermediary between the merchant and the bank.
- OTP (One-Time Password): A short code sent to a user's phone or email to confirm a transaction, valid for a single use.
- Request: A message sent from a client (like a browser) to a server asking for something, such as a web page or to process a payment.
- Response: The message sent back from the server to the client after processing a request.
- Server-side validation: Checks performed on the server (as opposed to the client) to ensure data is correct and safe.
- Digit count: The number of digits in a number; for example, 999 has three digits, 9999 has four.
- Currency format: The type of currency, such as USD (Dollar) or INR (Indian Rupee).
- POC (Proof of Concept): A demonstration that a vulnerability exists, often including the steps or code to reproduce it.
- VAPT: Vulnerability Assessment and Penetration Testing, a process of finding and exploiting security weaknesses.
- E-commerce: Buying and selling of goods or services over the internet.
- Intercept: To capture and hold a request or response so that it can be inspected or modified before being forwarded.
- Forward: To send an intercepted request or response on to its destination after inspection or modification.