All It Took Was a Negative Number: A Price Manipulation Story |
The application did not restrict the quantity field to positive integers, so a user could enter a negative quantity. By adding a negative quantity of a cheap item, an attacker could offset the price of an expensive item and place an order for far less than the intended total.
Sultan Nur KORKUSUZ GUCUK Follow
Published on medium.com
Not all vulnerabilities require complex payloads or advanced techniques. Sometimes, simply entering a negative number is enough.
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
Impact
An attacker could reduce the price of an expensive item to a very low amount and complete the purchase, as demonstrated by reducing a $1337 jacket to $1.30.
What the attacker needed
A free account on the lab; ability to intercept HTTP requests
How it was found
- Log in to the lab with the provided credentials.
- Add an expensive jacket to the cart.
- Add a cheap pair of shoes to the cart while intercepting the request.
- Change the shoes' quantity to a negative number calculated to offset the jacket's price.
- Forward the request and observe the reduced cart total.
- Place the order at the reduced price.
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.
An online shop lets you choose how many of an item to buy. The shop did not check that the number was positive, so you could type a negative number. A negative number subtracts money from the total, letting you buy something expensive for almost nothing.
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.