How To Hack PayU – And Buy 10x More For The Same Price
The PayU payment API signed concatenated form parameters without delimiters, so an attacker could move digits between the quantity and unit price fields while keeping the same signature. This allowed a buyer to pay the original total but receive many more items than paid for.
Published on web.archive.org
Do you know PayU? It is a Paypal competitor on emerging markets.
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 signature was computed over concatenated parameter values without delimiters, so shifting characters between adjacent fields did not change the signed string.
Impact
A buyer could pay the original total but receive many more items than paid for, and merchants relying on PayU's callback data could fulfil the inflated order.
What the attacker needed
A PayU merchant account; ability to modify form before submit; merchant uses callback data to fulfil orders
The fix
The text does not state that the issue was fixed; it suggests that PayU should validate that quantity times unit price equals total amount and use a safer signing method with delimiters or structured encoding.
How it was found
- Build a payment form with product quantity 1 and unit price 9850, total 9850.
- Calculate the signature by sorting fields, concatenating values, adding the private key, and hashing.
- Use browser developer tools to change quantity to 19 and unit price to 850 before submitting.
- Submit the form; the signature remains valid because the concatenated string is unchanged.
- Observe that PayU accepts the order and later sends the modified quantity and price in the callback.
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.
When you pay online, the payment provider checks that the order details haven't been tampered with by using a secret code (a signature). Here, the signature was made by simply joining all the values together without any separators, so moving a digit from one field to another produced the same joined string and the same signature. That let a buyer change the quantity and price while the total stayed the same, and the payment provider accepted it.
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.