Skip to content
Business logic Write-up Intermediate

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.

Diogo Gouveia, on medium.com

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

  1. Log into the marketplace with a normal user account.
  2. Select items and proceed to checkout.
  3. Intercept the payment request using a tool like Burp Suite or the browser's developer console.
  4. Change the payment_mode parameter from 'Cashback' to 'Cashback\u0000'.
  5. Submit the modified request.
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.