Skip to content
IDOR Write-up Beginner

Exposing Millions of Voter ID card users’ details.

The voter ID portal allowed unlimited brute-forcing of EPIC numbers, so valid IDs could be harvested and added to an attacker's profile to reveal the holder's personal details. A separate OTP check could be bypassed by altering the submitted value, letting an attacker take over another user's account and permanently delete their voter ID record.

Aziz Al Aman Follow

Published on infosecwriteups.com

In India, a Voter IDcard is an identity document issued by the Election Commission of India to adult domiciles of India who have reached the age of 18, which primarily serves as an identity proof for Indian citizens while casting their ballot in the country’s municipal, state, and national elections. More than 780…

Aziz Al Aman, on infosecwriteups.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. 6 min read.

Context

The target was the official Indian Voter ID card maintaining platform, nvsp.in. A Voter ID, also called an EPIC (Electors Photo Identification Card) number, is an alphanumeric identifier issued by the Election Commission of India to adult Indian citizens. It contains three letters followed by seven digits, for example WRI2345678, RDH2345678, DTN2345678, YCV2345678, NLN2345678 or XMB2345678. The report notes that more than 780 million Voter IDs are active at present.

The portal lets a user register an account and attach an EPIC number to their profile. During registration it offers two options, "I have EPIC number" and "I don't have EPIC number". If you choose the second, you can add a Voter ID later from the profile section. Once a valid EPIC number is attached, the portal's /forms/ section exposes a form, form001, pre-filled with the holder's details: name, father's name, address, date of birth and so on. There is also a "Deletion of Enrolment" option on the home page.

The researcher found three issues: brute-forcing valid Voter IDs and extracting their holders' details (IDOR / BOLA), an account takeover through an OTP bypass, and a logic flaw allowing permanent deletion of any user's Voter ID. All three were reported to [redacted] and fixed by the government.

Setup

The researcher was filling out a correction form for his mother's card, with Burp Suite running in the background, and decided to probe the site. No special accounts or roles were needed beyond ordinary registration. The tools were Burp Suite (Intruder and the proxy for intercepting requests) and a Python script the researcher wrote to automate the brute force. The only precondition for the first bug was a registered account without an attached EPIC number, so that an EPIC number could be added afterwards.

Finding it

After registering, the researcher tried to add a random EPIC number to his account. The portal rejected it as not valid. The portal rejected it as not valid, so the researcher sent that request to Burp Intruder for brute-forcing. Because the EPIC format is three letters plus seven digits, and the three-letter prefixes repeat across many IDs, the search space for a known prefix is only the seven digits.

From the original on infosecwriteups.com

Exploitation

Step 1: Brute-forcing valid EPIC numbers

The researcher sent the add-EPIC request to Burp Intruder.

sending an HTTP request for an invalid ID From the original on infosecwriteups.com

He placed the payload position on the seven-digit portion of the Epic_no parameter, keeping the three-letter prefix fixed, as in Epic_no=WRI$2345678$.

From the original on infosecwriteups.com
Adding payload position

The backend imposed no rate limit: the researcher could send unlimited requests without being blocked by a firewall. The server answered with a 302 redirect for every valid Voter ID, which made valid IDs easy to distinguish from invalid ones.

responding 302 for every valid voter ID From the original on infosecwriteups.com

He then wrote a Python script to brute-force the values and output all valid Voter IDs.

From the original on infosecwriteups.com

Step 2: Extracting the holder's details

With valid Voter IDs in hand, the researcher added them to his own profile under /Account/MyProfile. The /forms/ section then offered form001, already filled with the name, father's name, address, date of birth and other details belonging to the EPIC ID attached to the profile. In other words, attaching someone else's identifier to your own account returned that person's data.

Extracted details of a random Person From the original on infosecwriteups.com

Step 3: Account takeover via OTP bypass

On the profile details updating section, the researcher tried to add another user's phone number, creating a second account for the test. The change was protected by an OTP. Brute-forcing the OTP did not work. Recalling a write-up where the author appended 0 to the intercepted request, the researcher did the same on the OTP parameter, and it worked.

intercepting traffic while OTP is verifying From the original on infosecwriteups.com
Changed the OTP value to zero

After the bypass, the researcher expected only to register the victim's number and then reset the password. Instead, replacing the victim's number caused his own profile data to be replaced with the victim's details, giving him the victim's account.

From the original on infosecwriteups.com

Step 4: Deleting any user's Voter ID permanently

Using the first bug, an attacker can obtain any random user's Voter ID and add it to their own account. The home page then offers "Deletion of Enrolment", and nothing further is required: once the ID is on the attacker's profile, the attacker can permanently delete that user's Voter ID.

An attacker can delete any random user’s card permanently From the original on infosecwriteups.com

Root cause

The first bug combines a missing rate limit with an identifier that could be attached to the researcher's own profile and then disclosed through form001. and the pre-filled form001 then disclosed the holder's personal data. The absence of throttling or firewall blocking made enumeration of the seven-digit space practical, and the 302 response gave a clean oracle for validity.

The second bug is a logic flaw in OTP verification: appending 0 to the OTP parameter was accepted as valid. The report does not show the exact request or the comparison logic, so the precise parsing or type-juggling mistake is not stated. The consequence was worse than expected because the phone number change also rebound the profile to the victim's details, effectively transferring the account.

The third bug is a logic flaw in the deletion flow: once a Voter ID was added to the attacker's profile, the attacker could permanently delete that user's Voter ID.

Impact

An attacker with an ordinary account could enumerate valid Voter IDs, attach them to their own profile and read the holder's name, father's name, address and date of birth. With the OTP bypass, an attacker could take over another user's account by replacing the phone number. With the deletion flaw, an attacker could permanently delete any user's Voter ID. The report does not quantify how many records were exposed. All three issues were fixed by the government after being reported to CERT-In.

Fix

The report states only that the issues were fixed by the government after disclosure to [redacted]; it does not describe the changes made. The fixes that would address the root causes are: binding EPIC attachment and form001 access to the authenticated holder, rate-limiting and monitoring the Epic_no endpoint, validating OTPs strictly (exact match, no coercion or appended characters), and requiring proof of ownership before deletion of an enrolment.

Variants to test

  1. Identifier attachment endpoints: submit another user's identifier (EPIC, policy number, account number) to your own profile and check whether the response or a subsequent form discloses their data. A positive result is a pre-filled form containing details you do not own.
  2. Sequential or patterned identifiers: where an identifier has a fixed prefix and a numeric suffix, fix the prefix and fuzz the suffix. A positive result is a distinct response code (here a 302) for valid values and a different one for invalid values.
  3. Rate limiting: replay the validation request at volume and watch for blocks, captchas or throttling. A positive result is sustained throughput with no firewall intervention.
  4. OTP parameter tampering: intercept the OTP verification request and try appending characters such as 0, sending an empty value, or changing the type. A positive result is a successful verification with a value that is not the real OTP.
  5. Phone number change flows: change the registered number to another account's number and observe whether the profile data switches to that account's details. A positive result is access to the other account.
  6. Destructive actions gated only by possession: after attaching someone else's identifier, attempt deletion or other destructive operations. A positive result is a permanent change to another user's record.

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. 14 min read.

What happened, in plain words

A security researcher named Aziz was filling out a correction form for his mother's Voter ID card on the official Indian government portal for Voter ID cards, nvsp.in. He was not looking for bugs on a government website, but Burp Suite, a tool that lets you watch and change the traffic between your browser and a website, happened to be running in the background. He decided to have a try. After spending half an hour he found some critical issues, and all of them were later fixed by the government.

A Voter ID card in India is an identity document issued by the Election Commission of India to adult Indian citizens. It is used as proof of identity when voting in municipal, state and national elections. The report notes that more than 780 million Voter IDs are active at present. The number printed on the card is called the EPIC number, short for Electors Photo Identification Card. It is made of three letters followed by seven digits, for example WRI2345678, RDH2345678, DTN2345678, YCV2345678, NLN2345678 or XMB2345678.

The portal lets you create an account and attach an EPIC number to your profile. When you register it offers two choices, "I have EPIC number" and "I don't have EPIC number". If you pick the second one, you can add a Voter ID later from your profile page. Once a valid EPIC number is attached, the /forms/ section of the site shows a form called form001, already filled in with that person's details: name, father's name, address, date of birth and so on. The home page also has a "Deletion of Enrolment" option.

The three problems were:

  1. You could guess valid Voter ID numbers in bulk and then read the personal details of the people they belonged to.
  2. You could take over another person's account by getting past the one-time password (OTP) check.
  3. You could permanently delete any user's Voter ID.

All three were reported to [redacted] and fixed.

The ideas you need before we start

A few terms come up again and again, so here they are from zero.

HTTP request. When you type an address into your browser and press Enter, or click a button on a page, your browser sends a small text message to the website's computer (the server) asking it to do something. That message is an HTTP request. The server sends back an HTTP response. A request contains a method (such as GET to fetch something or POST to send data), a path (such as /Account/MyProfile), and sometimes a body with data in it.

Parameter. Many requests carry values, for example the number you typed into a form. These values are called parameters. In this story the important one is Epic_no, which carries the Voter ID number you are trying to add.

Status code. Every response starts with a three-digit number that summarises what happened. 200 means "here is the page you asked for". 302 means "the thing you asked for is somewhere else, go there instead", which is how websites usually redirect you after a successful action. 403 means "you are not allowed". Watching this number is a quick way to tell whether the server accepted or rejected what you sent.

Burp Suite. A program that sits between your browser and a website. It can record every request your browser makes (this is called proxying), let you edit a request before it is sent, and repeat the same request many times with small changes. The part that repeats a request with many different values is called Intruder.

Brute force. Trying every possible value until one works. Think of a padlock with a three-digit combination: there are only a thousand combinations, so you can simply try them all. Brute forcing is only practical when the number of possibilities is small enough and the website does not stop you after a few attempts.

Rate limiting. A rule on the server that says "no more than N requests per minute from one person". Without it, a script can send thousands of requests and the server will answer every one. A firewall is a filter that can also block traffic it considers abusive.

IDOR / BOLA. These two names describe the same mistake. IDOR stands for Insecure Direct Object Reference, BOLA for Broken Object Level Authorisation. The idea: the website lets you refer to an object (here, a Voter ID record) by its identifier, but never checks that the object belongs to you. It is like a hotel where any key card opens any room, because the door only checks that the card is a valid card, not which room it was issued for.

OTP. A one-time password: a short code, usually sent by SMS, that you must type to prove you own a phone number. It is meant to be used once and to be hard to guess.

Account takeover. Getting into someone else's account without their permission, so that you can see and change everything they can.

Logic flaw. A bug that is not about a broken piece of code but about the order or the rules of a process. The code does exactly what it was written to do, but the rule itself is wrong. Example: a shop that gives a refund before checking whether the item was ever bought.

Python script. A small program written in the Python language. Here it was used to send the same request over and over with different numbers and to collect the answers.

Setup

The researcher was filling out a correction form for his mother's card, with Burp Suite running in the background, and decided to probe the site. No special accounts or roles were needed beyond ordinary registration. The tools were Burp Suite (Intruder and the proxy for intercepting requests) and a Python script the researcher wrote to automate the brute force. The only precondition for the first bug was a registered account without an attached EPIC number, so that an EPIC number could be added afterwards.

From the original on infosecwriteups.com

Finding it

After registering, the researcher tried to add a random EPIC number to his account. The portal rejected it as not valid. The portal rejected it as not valid, so the researcher sent that request to Burp Intruder for brute-forcing. Because the EPIC format is three letters plus seven digits, and the three-letter prefixes repeat across many IDs, the search space for a known prefix is only the seven digits.

Why does that matter? If the whole identifier were random, you would have to guess ten characters at once, which is hopeless. But if you already know the three letters, only seven digits are unknown, and seven digits is only ten million possibilities. A computer can work through that in a reasonable time, provided the website lets it.

Exploitation

Step 1: Brute-forcing valid EPIC numbers

The researcher sent the add-EPIC request to Burp Intruder. Intruder is the part of Burp that takes one request and sends it again and again, each time with a different value in a marked spot.

sending an HTTP request for an invalid ID From the original on infosecwriteups.com

The screenshot shows an HTTP request for an invalid ID being prepared for this repetition.

He placed the payload position on the seven-digit portion of the Epic_no parameter, keeping the three-letter prefix fixed, as in Epic_no=WRI$2345678$.

Text
Epic_no=WRI$2345678$

Line by line: Epic_no= is the name of the parameter the server reads. WRI is the three-letter prefix, which stays the same in every attempt. The two $ signs are Burp's markers: everything between them is the part that gets replaced on each attempt. 2345678 is just a placeholder standing where the seven digits go. So on the first attempt Burp might send Epic_no=WRI0000000, on the next Epic_no=WRI0000001, and so on through the whole range.

From the original on infosecwriteups.com
Adding payload position

The second screenshot shows the payload position being set in Burp.

The backend imposed no rate limit: the researcher could send unlimited requests without being blocked by a firewall. The server answered with a 302 redirect for every valid Voter ID, which made valid IDs easy to distinguish from invalid ones.

responding 302 for every valid voter ID From the original on infosecwriteups.com

This is the key observation. The server did not say "yes, this ID exists" in words. It simply redirected (302) when the ID was valid and did something else when it was not. That difference is enough for a script: it does not need to understand the page, only to notice which status code came back.

He then wrote a Python script to brute-force the values and output all valid Voter IDs.

From the original on infosecwriteups.com

The script brute-forces the values and outputs all valid Voter IDs for the researcher.

Step 2: Extracting the holder's details

With valid Voter IDs in hand, the researcher added them to his own profile under /Account/MyProfile. The /forms/ section then offered form001, already filled with the name, father's name, address, date of birth and other details belonging to the EPIC ID attached to the profile. In other words, attaching someone else's identifier to your own account returned that person's data.

Extracted details of a random Person From the original on infosecwriteups.com

This is the IDOR / BOLA part: a valid EPIC number added to the researcher's own profile returned that person's details. It is as if a bank let you type any account number into your own online banking page and then showed you that account's statements.

Step 3: Account takeover via OTP bypass

On the profile details updating section, the researcher tried to add another user's phone number, creating a second account for the test. The change was protected by an OTP. Brute-forcing the OTP did not work. Recalling a write-up where the author appended 0 to the intercepted request, the researcher did the same on the OTP parameter, and it worked.

intercepting traffic while OTP is verifying From the original on infosecwriteups.com
Changed the OTP value to zero

The first screenshot shows the traffic being intercepted while the OTP is being verified. The second shows the OTP value changed to zero. Intercepting means Burp holds the request before it leaves your computer, so you can edit it. Here the edit was to append a 0 to the value of the OTP parameter.

Why would that work? The report does not show the exact request or the comparison logic, so the precise parsing or type-juggling mistake is not stated. What we can say is that the server accepted a value that was not the real OTP. A correct check would compare the submitted code with the stored one exactly, character for character, and reject anything else.

After the bypass, the researcher expected only to register the victim's number and then reset the password. Instead, replacing the victim's number caused his own profile data to be replaced with the victim's details, giving him the victim's account.

From the original on infosecwriteups.com

This is the account takeover: replacing the victim's number changed the researcher's profile data to the victim's details.

Step 4: Deleting any user's Voter ID permanently

Using the first bug, an attacker can obtain any random user's Voter ID and add it to their own account. The home page then offers "Deletion of Enrolment", and nothing further is required: once the ID is on the attacker's profile, the attacker can permanently delete that user's Voter ID.

An attacker can delete any random user’s card permanently From the original on infosecwriteups.com

This is the logic flaw: once a Voter ID was added to the attacker's profile, the attacker could permanently delete that user's Voter ID. Since the first bug lets anyone put any number on their profile, the deletion feature becomes a weapon against anyone.

Root cause

The first bug combines a missing rate limit with an identifier that could be attached to the researcher's own profile and then disclosed through form001. and the pre-filled form001 then disclosed the holder's personal data. The absence of throttling or firewall blocking made enumeration of the seven-digit space practical, and the 302 response gave a clean oracle for validity.

The second bug is a logic flaw in OTP verification: appending 0 to the OTP parameter was accepted as valid. The consequence was worse than expected because the phone number change also rebound the profile to the victim's details, effectively transferring the account.

The third bug is a logic flaw in the deletion flow: once a Voter ID was added to the attacker's profile, the attacker could permanently delete that user's Voter ID.

Impact

An attacker with an ordinary account could enumerate valid Voter IDs, attach them to their own profile and read the holder's name, father's name, address and date of birth. With the OTP bypass, an attacker could take over another user's account by replacing the phone number. With the deletion flaw, an attacker could permanently delete any user's Voter ID. The report does not quantify how many records were exposed. All three issues were fixed by the government after being reported to CERT-In.

Fix

The report states only that the issues were fixed by the government after disclosure to [redacted]; it does not describe the changes made. The fixes that would address the root causes are: binding EPIC attachment and form001 access to the authenticated holder, rate-limiting and monitoring the Epic_no endpoint, validating OTPs strictly (exact match, no coercion or appended characters), and requiring proof of ownership before deletion of an enrolment.

Variants to test

If you want to look for similar problems on other sites, here is what to try. Each item says what to do and what a positive result looks like.

  1. Identifier attachment endpoints: submit another user's identifier (EPIC, policy number, account number) to your own profile and check whether the response or a subsequent form discloses their data. A positive result is a pre-filled form containing details you do not own.
  2. Sequential or patterned identifiers: where an identifier has a fixed prefix and a numeric suffix, fix the prefix and fuzz the suffix. A positive result is a distinct response code (here a 302) for valid values and a different one for invalid values.
  3. Rate limiting: replay the validation request at volume and watch for blocks, captchas or throttling. A positive result is sustained throughput with no firewall intervention.
  4. OTP parameter tampering: intercept the OTP verification request and try appending characters such as 0, sending an empty value, or changing the type. A positive result is a successful verification with a value that is not the real OTP.
  5. Phone number change flows: change the registered number to another account's number and observe whether the profile data switches to that account's details. A positive result is access to the other account.
  6. Destructive actions gated only by possession: after attaching someone else's identifier, attempt deletion or other destructive operations. A positive result is a permanent change to another user's record.

Glossary

  • HTTP request: the message your browser sends to a website's server asking it to do something, such as show a page or save a form.
  • HTTP response: the message the server sends back, containing a status code and usually a page or data.
  • Status code: the three-digit number at the start of a response that says what happened, for example 200 for success, 302 for a redirect, 403 for forbidden.
  • 302 redirect: a status code meaning "the thing you asked for is elsewhere, go there instead"; often used after a successful action.
  • Parameter: a named value carried inside a request, such as Epic_no carrying a Voter ID number.
  • Endpoint: a specific address on a server that accepts requests, such as /Account/MyProfile.
  • Burp Suite: a tool that sits between your browser and a website so you can record, edit and repeat requests.
  • Proxy: a program that passes traffic between two parties and can inspect or change it on the way.
  • Intercept: to hold a request before it is sent so you can read or edit it.
  • Intruder: the part of Burp Suite that repeats one request many times with different values in a marked position.
  • Payload: the value that gets inserted into the marked position on each attempt.
  • Rate limiting: a server rule that caps how many requests one client may send in a period.
  • Firewall: a filter that can block traffic it considers unwanted or abusive.
  • IDOR: Insecure Direct Object Reference, a bug where a site lets you refer to an object by its identifier without checking that it belongs to you.
  • BOLA: Broken Object Level Authorisation, the same idea as IDOR, named from the authorisation angle.
  • Authorisation check: the part of a site that decides whether you are allowed to do what you are asking.
  • Enumeration: listing items one by one, here valid Voter ID numbers, by trying candidates and keeping the ones that exist.
  • Oracle: any observable difference in a server's answer (a status code, a message, a timing) that tells you something you were not supposed to know.
  • EPIC number: Electors Photo Identification Card number, the number on an Indian Voter ID card, three letters followed by seven digits.
  • Voter ID: the identity document issued by the Election Commission of India to adult Indian citizens.
  • OTP: one-time password, a short code sent to your phone to prove you own the number.
  • Account takeover: gaining access to someone else's account without permission.
  • Logic flaw: a bug where the rules of a process are wrong, even though the code does what it was written to do.
  • Python script: a small program written in the Python language, used here to automate repeated requests.
  • CERT-In: the Indian Computer Emergency Response Team, the body that receives vulnerability reports for Indian systems.

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.