How A Null Character Was Used to Bypass Payments
The payment_mode parameter was not properly sanitised, so appending a null character to 'Cashback' caused the system to process the order without verifying the cashback balance. An attacker could place orders without having the required funds.
medium.com
Published on medium.com
Hello, my name is Diogo Gouveia, I’m a Portuguese Software Developer and Cyber Security enthusiast. Today, I want to share a security vulnerability that I discovered in a Portuguese Food Delivery App, which involves null characters in the paymentmode parameter.
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 failed to validate or sanitise null characters in the payment_mode parameter, causing inconsistent parsing between the validation and payment processing components.
Impact
Attackers could place orders without making legitimate payments, potentially causing financial losses to the business.
What the attacker needed
A user account on the app; ability to intercept HTTP requests
The fix
The application should validate and sanitise input to reject null characters and enforce a whitelist of accepted payment modes.
How it was found
- Log into the marketplace with a normal user account.
- Select items and proceed to checkout.
- Intercept the payment request using a tool like Burp Suite or the browser's developer console.
- Change the payment_mode parameter from 'Cashback' to 'Cashback\u0000'.
- Submit the modified request.
- The order is placed without proper payment validation.
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.
A null character is a special invisible character that some programs treat as the end of a text string. The app checked the payment method by looking at the text before the null character, but the payment system ignored everything after it, so the order went through without checking if the user had enough cashback. This let someone order food without paying.
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.