Unveiling A Bug Paying 1 And Receiving 100 Or Any Amount In Return
The payment system had two separate amount fields: one for the amount charged to the credit card and one for the amount credited to the account. The payment amount field lacked validation, so an attacker could set it to a lower value than the recharge amount, paying less and receiving more credit.
Published on infosecwriteups.com
Hi everyone, this write-up is about a vulnerability I discovered in a private bug bounty program. Due to privacy & legal concerns, I will be providing sample requests and screenshots to illustrate the vulnerability.
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 application trusted client-supplied values for both the payment amount and the recharge amount without validating that they matched or were within expected bounds.
Impact
Any user could manipulate the payment system to pay less and receive more credit, leading to financial losses for the organisation; the author tested up to $50,000 without detection.
What the attacker needed
A user account with recharge option; ability to intercept HTTP traffic; a valid credit card
The fix
The application should implement thorough input validation and robust payment processing logic to ensure accurate handling of transactions.
How it was found
- Initiate a recharge by entering an amount and clicking the recharge button.
- Intercept the request to the payment gateway using Burp Suite.
- Modify the payment_amount parameter to a lower value (e.g., $1) while keeping recharge_amount at the desired higher value (e.g., $100).
- Forward the request; the IPG accepts the lower payment.
- Complete the payment with card details; the account is credited with the higher recharge amount.
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 system should check that the amount you are charged matches the amount added to your account. Here, the system trusted two separate numbers sent by the user without checking they were the same. An attacker could change one number to pay less and still get the full amount credited.
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.