Skip to content
IDOR Write-up Beginner

**How We Found a Critical Bug in India’s Income Tax Portal That Put 135M+ Users’ Sensitive Data at Risk**

The Income Tax e-Filing portal accepted a PAN number supplied in a request and returned the corresponding taxpayer's data without checking that the authenticated user was authorised to access that PAN. An attacker with an account could change the PAN to another person's and view sensitive personal and financial information.

Viral Vaghela Follow

Published on vaghelaviral.medium.com

Web Security

Viral Vaghela, on vaghelaviral.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

The target was India's Income Tax e-Filing portal, the government service where taxpayers file their returns. The feature involved is the part of the portal that returns a logged-in user's own information: the client sends a PAN number in an HTTP POST request, and the backend uses that PAN to look up and return the corresponding user's data.

The author was filing his income tax return for the first time and, out of habit, had Burp Suite open to intercept traffic. He was not running a scanner and was not looking for a vulnerability. He noticed that a PAN number was being passed from the client in a POST request, and asked himself what would happen if he changed it.

From the original on vaghelaviral.medium.com

Setup

The preconditions were minimal:

  1. A normal, authenticated account on the Income Tax e-Filing portal (the author's own).
  2. Burp Suite, used as an intercepting proxy to inspect and modify requests.
  3. A second PAN belonging to a friend, used as the test identifier.

No special role, tooling or configuration beyond that is described.

Finding it

While going through the return-filing flow, the author intercepted the requests the portal made. One of them stood out: a PAN number was being sent from the client in an HTTP POST request. Since the PAN identifies the taxpayer whose data is being requested, having the client supply it is a natural place to test whether the server checks that the caller is entitled to that identifier.

Exploitation

Step 1: Intercept the request carrying the PAN

With Burp Suite in place, the author captured the POST request in which his own PAN was sent to the backend. The report does not reproduce the raw request, headers or endpoint.

Step 2: Swap the PAN and resend

The author replaced his own PAN in the request with his friend's PAN and sent the request. The report does not show the modified request body.

Step 3: Observe the response

The server returned the friend's data. The author describes the moment as "Boom. I got his data."

From the original on vaghelaviral.medium.com

Step 4: Rule out alternative explanations

Because the result was unexpected, the author did not take it at face value. He considered that it might be cached data, that the application had mixed something up, or that some additional check would kick in later. He and his collaborator then looked at the behaviour more carefully and confirmed the pattern was consistent: the backend was taking the PAN supplied in the request and using it to retrieve the corresponding user's information, without properly checking whether the authenticated caller was authorised to access the data belonging to that PAN.

The report illustrates the flaw with two simplified diagrams. In the legitimate case, the authenticated user sends their own PAN and receives their own data:

Text
User A  |  | Authenticated request  | PAN = User A  vServer  |  | Returns User A's data

By changing the identifier, the same authenticated session receives another user's data:

Text
User A  |  | Authenticated request  | PAN = User B  vServer  |  | Returns User B's data

The server knew who the caller was; it simply was not checking what the caller was allowed to access. That is the core of an Insecure Direct Object Reference (IDOR).

Step 5: Decide how far to test

Once the vulnerability was confirmed, the author deliberately limited testing. The question he asked was not how much data could be retrieved, but what the minimum was needed to prove the impact. The objective was validation, not harvesting, precisely because the data involved belonged to real people. The report does not describe any bulk enumeration or further exploitation beyond the single PAN swap.

Root cause

The backend used the PAN supplied by the client to look up the corresponding user's record, but did not verify that the authenticated user making the request was authorised to access the record for that PAN. Authentication was working: the server knew exactly who the caller was. Authorisation was not enforced on the object being requested.

The report frames this as the distinction between authentication (who are you?) and authorisation (what are you allowed to access?). The first question was being answered; the second was not being enforced properly. The author frames it as a developer forgetting one authorisation check, and notes there was no SQL injection, remote code execution or privilege escalation.: there was no SQL injection, remote code execution or privilege escalation, and the issue was not a zero-day or an elaborate exploit chain. The flow was simply: log in, intercept the request, change the PAN, receive another user's data.

Impact

The response contained actual taxpayer information. According to the report, the data that could be exposed included names, addresses, dates of birth, phone numbers, email addresses, bank account information and Aadhaar numbers, and the issue also affected information associated with companies registered on the portal.

The scale is what made the missing check serious. According to reporting at the time, the portal had more than 135 million registered users, and around 76 million individuals had filed returns for FY 2024-25. The author is explicit that 135 million was the number of registered users, not the number of people confirmed to have had their data accessed; the exact number of impacted users was not publicly established.

In the demonstrated case, an authenticated user could request another taxpayer's record by supplying that taxpayer's PAN.

Reporting and disclosure

Once the finding was confirmed, the author and his friend Akshay reported it to CERT-In, India's national incident-response agency. The issue was then taken up with the Income Tax Department. TechCrunch later reported that CERT-In had acknowledged the issue and that the Income Tax Department was working on a fix.

From the original on vaghelaviral.medium.com

The waiting period was the difficult part: the author knew what the vulnerability could do, but not how long it had existed, whether anyone else had found it, or whether it had already been abused. Public reporting later confirmed the fix, but it remained unclear how long the bug had existed or whether malicious actors had accessed or misused taxpayer data before it was fixed.

Fix

By early October, the author verified that the behaviour he had originally demonstrated no longer worked: the vulnerability had been patched. TechCrunch published its investigation on October 7, 2025, after independently verifying the issue and confirming that it had been fixed.

From the original on vaghelaviral.medium.com

The fix that addresses this class of flaw is server-side enforcement of object-level authorisation: after authenticating the caller, the backend must confirm that the authenticated identity is entitled to the PAN (or other object identifier) supplied in the request, and reject the request otherwise, rather than trusting the client-supplied identifier to select the record.

Variants to test

  1. Client-supplied identifiers in POST bodies. Look for requests where an account number, customer ID, PAN, tax ID or similar identifier is sent by the client. Replace it with a second account's identifier and resend. A positive result is a response containing the second account's data rather than an error or the caller's own data.
  2. Identifiers in query strings and path segments. The same swap on GET endpoints such as a profile or document fetch. A positive result is another user's record returned with a 200 status.
  3. Identifiers in JSON and form fields. Change the value in place, keeping the session cookie and all other fields identical, so that only the object reference differs. A positive result is data belonging to the other object.
  4. Nested or related objects. Where a request references a parent record and a child record (for example a return and an attached document), change only the child identifier while keeping the parent one that belongs to the caller. A positive result shows the authorisation check is applied to the parent but not the child.
  5. Company or entity identifiers. The report notes that company records on the portal were also affected. On other targets, test identifiers for organisations as well as individuals, since checks are often implemented for one and forgotten for the other.
  6. Response differences as an oracle. Compare status codes, response lengths and error messages between a valid identifier you own and one you do not. A positive result is a distinguishable response for the foreign identifier, which indicates the lookup happens before the authorisation decision.

When testing any of these, keep to the minimum needed to prove the issue, as the author did: confirm the flaw with a single controlled identifier rather than retrieving records in bulk.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 15 min read.

What happened, in plain words

A security researcher was filing his income tax return for the first time on India's Income Tax e-Filing portal, the government website where taxpayers submit their returns. Out of habit, he had a tool called Burp Suite open. Burp Suite sits between your browser and the website and lets you see, pause and change the messages your browser sends. While watching those messages, he noticed that his own PAN number was being sent from his browser to the server in an HTTP POST request. A PAN is the permanent account number that identifies a taxpayer in India. He wondered what would happen if he changed that number to someone else's. He replaced his PAN with a friend's PAN and sent the request again. The server returned the friend's data. That is an Insecure Direct Object Reference, or IDOR: the server knew who was logged in, but it did not check whether that person was allowed to see the record being requested. The data that could be exposed included names, addresses, dates of birth, phone numbers, email addresses, bank account information and Aadhaar numbers, and company records on the portal were affected too. The portal had more than 135 million registered users at the time, according to reporting. The researcher and his friend Akshay reported the issue to CERT-In, India's national incident-response agency, and it was later fixed. TechCrunch published its investigation on October 7, 2025, after independently verifying the issue and confirming the fix.

From the original on vaghelaviral.medium.com

The setting: what the portal does and what was being tested

The Income Tax e-Filing portal is the government service where taxpayers file their returns. When you log in, the portal shows you your own information: your profile, your return, your documents. To do that, the website has to ask the server for the record that belongs to you. The feature involved here is exactly that: the part of the portal that returns a logged-in user's own information. The client, meaning your browser, sends a PAN number in an HTTP POST request, and the backend, the server-side code you never see, uses that PAN to look up and return the corresponding user's data.

A few everyday comparisons help before going further.

  • HTTP request: a message your browser sends to a website, like an order slip you hand to a counter clerk. It says what you want and includes the details the clerk needs.
  • POST request: a request that carries information in its body, the way a form you fill in and hand over carries your answers. A GET request is more like asking for a page by name, with the details visible in the address.
  • Backend: the part of the website that runs on the server, out of sight, like the kitchen of a restaurant. Your browser is the dining room; the backend prepares what you asked for.
  • API: the set of rules and addresses the browser uses to talk to the backend, like a menu with numbered items. The browser asks for item 12, and the kitchen sends back item 12.
  • PAN: the permanent account number that identifies a taxpayer in India, like a library card number that points to one person's account.
  • Burp Suite: a tool that sits between your browser and the website, like a mailroom that can open, read and rewrite letters before they are delivered. Security researchers use it to inspect and modify requests.
  • Intercepting proxy: the general name for that kind of middleman. It receives your browser's request, lets you look at it, and forwards it to the server, optionally after you change it.
  • Authenticated: logged in, meaning the server knows who you are, like a receptionist who has checked your ID and knows your name.
  • Authorised: allowed to access a particular thing, like a receptionist who knows your name but still has to check whether you may enter a specific room.
  • IDOR (Insecure Direct Object Reference): a flaw where the server takes an identifier supplied by the client, such as an account number, and returns the matching record without checking that the caller is allowed to see it. It is like a hotel clerk handing over any room key to anyone who asks for that room number, without checking that the guest is booked into it.

Setup: what was needed to try this

The preconditions were minimal:

  1. A normal, authenticated account on the Income Tax e-Filing portal (the author's own).
  2. Burp Suite, used as an intercepting proxy to inspect and modify requests.
  3. A second PAN belonging to a friend, used as the test identifier.

No special role, tooling or configuration beyond that is described. In plain terms: you need to be a normal logged-in user, you need a way to see and change the messages your browser sends, and you need one other identifier to try in place of your own. The third item is what makes the test possible: without a second PAN, there is nothing to swap in. The author used a friend's PAN rather than hunting for strangers' numbers.

Finding it: how the request was noticed

While going through the return-filing flow, the author intercepted the requests the portal made. One of them stood out: a PAN number was being sent from the client in an HTTP POST request. Since the PAN identifies the taxpayer whose data is being requested, having the client supply it is a natural place to test whether the server checks that the caller is entitled to that identifier.

Why does that matter? Because the client is the browser, and anything the browser sends can be changed by the person using it. If the server trusts the browser to say which record to return, the browser can ask for someone else's record. The safe design is for the server to look up who is logged in, from something the user cannot forge, and then decide whether that person may see the requested record. The unsafe design is to take the identifier from the request and return whatever it points to. The author was not running a scanner and was not looking for a vulnerability; he simply noticed the pattern and asked a question.

Exploitation: the steps, one at a time

Step 1: Intercept the request carrying the PAN

With Burp Suite in place, the author captured the POST request in which his own PAN was sent to the backend. The report does not reproduce the raw request, headers or endpoint. Capturing the request means pausing it before it reaches the server, so you can read exactly what your browser was about to send. This is the equivalent of holding a letter before it goes into the postbox and reading the address on the envelope.

Step 2: Swap the PAN and resend

The author replaced his own PAN in the request with his friend's PAN and sent the request. The report does not show the modified request body. The important detail is that only the identifier was changed before resending. That isolates the variable. If the response changes when only the PAN changes, the PAN is what selected the record.

Step 3: Observe the response

The server returned the friend's data. The author describes the moment as "Boom. I got his data."

From the original on vaghelaviral.medium.com

Step 4: Rule out alternative explanations

Because the result was unexpected, the author did not take it at face value. He considered that it might be cached data, that the application had mixed something up, or that some additional check would kick in later. Cached data would mean the browser or an intermediary had stored an old response and shown it again, rather than the server answering fresh. A mix-up would mean the server had confused two records by accident. A later check would mean the server returned something early but would block it before it was really used. He and his collaborator then looked at the behaviour more carefully and confirmed the pattern was consistent: the backend was taking the PAN supplied in the request and using it to retrieve the corresponding user's information, without properly checking whether the authenticated caller was authorised to access the data belonging to that PAN.

The report illustrates the flaw with two simplified diagrams. In the legitimate case, the authenticated user sends their own PAN and receives their own data:

Text
User A  |  | Authenticated request  | PAN = User A  vServer  |  | Returns User A's data

Line by line: User A is the person using the browser. Authenticated request means the server has already confirmed that this is User A, for example through the login session. PAN = User A is the identifier placed in the request. Server is the backend that receives it. Returns User A's data is the response: the record that matches the PAN that was sent. In this case everything lines up, because the person asking and the record requested belong to the same user.

By changing the identifier, the same authenticated session receives another user's data:

Text
User A  |  | Authenticated request  | PAN = User B  vServer  |  | Returns User B's data

Line by line: the same User A is still logged in, so the Authenticated request is still genuine. But now PAN = User B, because the identifier in the request was changed. The Server receives it and Returns User B's data. The server knew who the caller was; it simply was not checking what the caller was allowed to access. That is the core of an Insecure Direct Object Reference (IDOR).

Step 5: Decide how far to test

Once the vulnerability was confirmed, the author deliberately limited testing. The question he asked was not how much data could be retrieved, but what the minimum was needed to prove the impact. The objective was validation, not harvesting, precisely because the data involved belonged to real people. The report does not describe any bulk enumeration or further exploitation beyond the single PAN swap.

This is a professional and ethical point worth spelling out for a beginner. When you find that you can see someone else's data, the temptation is to see how much you can pull. That is the wrong instinct. Every extra record you fetch is another person's private information exposed for no reason. One controlled test, using an identifier you are allowed to use, is enough to prove the flaw. The rest is for the people who own the system to fix.

Root cause: why it worked

The backend used the PAN supplied by the client to look up the corresponding user's record, but did not verify that the authenticated user making the request was authorised to access the record for that PAN. Authentication was working: the server knew exactly who the caller was. Authorisation was not enforced on the object being requested.

The report frames this as the distinction between authentication (who are you?) and authorisation (what are you allowed to access?). The first question was being answered; the second was not being enforced properly. The author frames it as a developer forgetting one authorisation check, and notes there was no SQL injection, remote code execution or privilege escalation.: there was no SQL injection, remote code execution or privilege escalation, and the issue was not a zero-day or an elaborate exploit chain. The flow was simply: log in, intercept the request, change the PAN, receive another user's data.

A few of those terms, from zero:

  • SQL injection: tricking a database by putting database commands into input fields, like writing a fake order on a form so the kitchen reads it as an instruction. It was not present here.
  • Remote code execution: making the server run code of your choosing, like getting the kitchen to cook a dish you invented. It was not present here.
  • Privilege escalation: gaining more permissions than you were given, like a guest finding a master key. It was not present here.
  • Zero-day: a flaw that was not publicly known and for which no fix exists yet. This was not one; it was a known class of mistake.
  • Exploit chain: a series of small weaknesses combined to achieve a bigger result. There was no chain here, just one missing check.

Impact: what could be exposed and at what scale

The response contained actual taxpayer information. According to the report, the data that could be exposed included names, addresses, dates of birth, phone numbers, email addresses, bank account information and Aadhaar numbers, and the issue also affected information associated with companies registered on the portal. Aadhaar is India's national identity number, so this is identity-level data, not just contact details.

The scale is what made the missing check serious. According to reporting at the time, the portal had more than 135 million registered users, and around 76 million individuals had filed returns for FY 2024-25. The author is explicit that 135 million was the number of registered users, not the number of people confirmed to have had their data accessed; the exact number of impacted users was not publicly established.

In the demonstrated case, an authenticated user could request another taxpayer's record by supplying that taxpayer's PAN.

Reporting and disclosure: who was told and what happened next

Once the finding was confirmed, the author and his friend Akshay reported it to CERT-In, India's national incident-response agency. CERT-In is the team a country relies on when a serious computer security incident needs to be handled and passed to the right people. The issue was then taken up with the Income Tax Department. TechCrunch later reported that CERT-In had acknowledged the issue and that the Income Tax Department was working on a fix.

From the original on vaghelaviral.medium.com

The waiting period was the difficult part: the author knew what the vulnerability could do, but not how long it had existed, whether anyone else had found it, or whether it had already been abused. Public reporting later confirmed the fix, but it remained unclear how long the bug had existed or whether malicious actors had accessed or misused taxpayer data before it was fixed.

Fix: how it was closed

By early October, the author verified that the behaviour he had originally demonstrated no longer worked: the vulnerability had been patched. TechCrunch published its investigation on October 7, 2025, after independently verifying the issue and confirming that it had been fixed.

From the original on vaghelaviral.medium.com

The fix that addresses this class of flaw is server-side enforcement of object-level authorisation: after authenticating the caller, the backend must confirm that the authenticated identity is entitled to the PAN (or other object identifier) supplied in the request, and reject the request otherwise, rather than trusting the client-supplied identifier to select the record. In everyday terms, the receptionist who already knows your name must also check that the room number you are asking about is yours before handing over the key.

Variants to test: where else this mistake appears

  1. Client-supplied identifiers in POST bodies. Look for requests where an account number, customer ID, PAN, tax ID or similar identifier is sent by the client. Replace it with a second account's identifier and resend. A positive result is a response containing the second account's data rather than an error or the caller's own data.
  2. Identifiers in query strings and path segments. The same swap on GET endpoints such as a profile or document fetch. A positive result is another user's record returned with a 200 status. A 200 status is the standard "OK" code a server sends when it returns content successfully.
  3. Identifiers in JSON and form fields. Change the value in place, keeping the session cookie and all other fields identical, so that only the object reference differs. A positive result is data belonging to the other object. A session cookie is a small piece of data your browser stores after you log in and sends with each request, like a wristband that proves you are inside the venue. JSON is a common text format for structured data, like a labelled list of fields and values.
  4. Nested or related objects. Where a request references a parent record and a child record (for example a return and an attached document), change only the child identifier while keeping the parent one that belongs to the caller. A positive result shows the authorisation check is applied to the parent but not the child.
  5. Company or entity identifiers. The report notes that company records on the portal were also affected. On other targets, test identifiers for organisations as well as individuals, since checks are often implemented for one and forgotten for the other.
  6. Response differences as an oracle. Compare status codes, response lengths and error messages between a valid identifier you own and one you do not. A positive result is a distinguishable response for the foreign identifier, which indicates the lookup happens before the authorisation decision. An oracle here means any observable difference that tells you something about what the server did internally.

When testing any of these, keep to the minimum needed to prove the issue, as the author did: confirm the flaw with a single controlled identifier rather than retrieving records in bulk.

Glossary

  • Aadhaar number: India's national identity number, used to identify a person.
  • API: the set of rules and addresses a browser uses to talk to a server, like a menu of numbered items.
  • Authenticated: logged in; the server knows who you are.
  • Authentication: the process of proving who you are, such as logging in.
  • Authorisation: the process of deciding what a known user is allowed to access.
  • Backend: the server-side part of a website that does the work out of sight.
  • Burp Suite: a tool that sits between browser and website so requests can be inspected and modified.
  • Cached data: a stored copy of an earlier response, shown again instead of a fresh answer.
  • CERT-In: India's national incident-response agency for computer security.
  • Client: the browser or app on the user's side that sends requests.
  • Cookie: a small piece of data stored by the browser and sent with requests, often used to keep you logged in.
  • Exploit chain: several weaknesses combined to achieve a larger result.
  • GET request: a request that asks for a resource, with details typically in the address.
  • HTTP request: a message from browser to server asking for something or sending data.
  • IDOR (Insecure Direct Object Reference): a flaw where the server returns a record based on a client-supplied identifier without checking the caller is allowed to see it.
  • Intercepting proxy: a middleman tool that pauses, shows and can change requests between browser and server.
  • JSON: a text format for structured data made of field names and values.
  • Oracle: any observable difference in responses that reveals something about the server's internal behaviour.
  • PAN: the permanent account number that identifies a taxpayer in India.
  • POST request: a request that carries data in its body, such as a form submission.
  • Privilege escalation: gaining more permissions than you were granted.
  • Query string: the part of a URL after the question mark that carries parameters.
  • Remote code execution: making a server run code of your choosing.
  • Session: the logged-in state that links your requests to your account.
  • SQL injection: tricking a database by inserting database commands into input.
  • Status code: a number a server returns to say how a request went, such as 200 for OK.
  • Zero-day: a previously unknown flaw with no fix available yet.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.