Skip to content
Business logic Write-up Beginner

How I hacked Income Tax Website

The income tax website passed the payment amount from the frontend to the backend when generating a checkout URL, allowing the user to change the amount. An attacker could pay a much smaller fee than required by editing the request.

medium.com

Published on medium.com

This was back in 2023 when I was in college, that time government had passed a mandate for everyone to link their Aadhar cards with their Pan cards and just like every good college going student who misses out on their assignment submission deadline…

Adwait Gawade, 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 server trusted a client-supplied amount field (totalAmt) when creating the payment checkout, instead of calculating the correct fee server-side.

Impact

An attacker could pay a much lower amount than required for linking PAN and Aadhaar, causing financial loss to the service; the author stopped before completing the reduced payment.

What the attacker needed

A user account on the income tax website; ability to intercept and modify HTTP requests; a payment step that uses a client-supplied amount

How it was found

  1. Open the income tax website with an intercepting proxy and turn on interception.
  2. Proceed through the process until just before redirection to the payment gateway.
  3. Intercept the request that generates the checkout URL and contains the totalAmt field.
  4. Change the totalAmt value from 1000 to 1 and forward the request.
  5. Continue the normal flow, accept the terms, and observe the payment gateway asking for 1 rupee.

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 website often sends the amount to a payment processor. If the website trusts the amount sent by your browser instead of checking it on its own server, you can change it. Here, the author changed the fee from 1000 rupees to 1 rupee and the payment page 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.

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.