Uncovering a Hidden Logic Flow-A Deep Dive into Exploitation!
The payment verification logic was flawed, allowing an attacker to modify the response status code from '0' to '1' to mark an incomplete payment as successful. This enabled placing an order while paying less than the full amount.
Published on medium.com
The original lives on medium.com
We do not hold its text, 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 server relied on a client-supplied status code to determine payment success instead of verifying with the payment gateway.
Impact
An attacker could pay less than the required amount and still have their order processed, leading to financial loss for the platform.
What the attacker needed
A user account on the platform; ability to intercept and modify HTTP responses
The fix
The payment validation should be performed server-side by verifying the transaction with the payment gateway, not by trusting a client-modifiable status code.
How it was found
- Place an order and intercept the payment request.
- Modify the payment amount to be less than the total.
- Observe the server response with status code '0' indicating failure.
- Change the status code in the response from '0' to '1'.
- Resend the modified request and see the order accepted as successful.
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 buy something online, the website checks with the payment system to confirm you paid. Here, the website trusted a simple 'success' flag that the user's browser could change. So the attacker made the website think the payment went through even though it didn't.
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.