Millions of Records Exposed via SQL Injection in a Tamil Nadu Government Portal
An admin login panel on a Tamil Nadu government portal was vulnerable to time-based SQL injection, which let the author dump large tables of citizen and user data. The same injection on the user login page allowed logging in as any user by submitting a crafted password, giving full account takeover.
Published on medium.com
Recently, I discovered a critical SQL injection vulnerability in a Tamil Nadu government web portal. This flaw allowed unauthorized access to lakhs of sensitive records including Aadhaar numbers, user credentials, user IDs, student data, and other Personally Identifiable Information (PII).
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 login forms built database queries by concatenating user input instead of using parameterised queries, and several backend endpoints also lacked authentication checks.
Impact
The author claims exposure of Aadhaar numbers, credentials, tokens and around a million student records, plus account takeover of any user and full back-end access; the text does not mention any defence that limited the attack.
What the attacker needed
Internet access to the portal; a valid user identifier to target
The fix
The login forms and backend endpoints should be fixed by using parameterised queries and enforcing authentication and token checks on every endpoint.
How it was found
- Run directory brute-forcing against the site to find hidden pages.
- Discover an admin login panel among the results.
- Send common SQL injection characters into the login fields and observe a server error.
- Use an automated SQL injection tool against the captured request to dump the database.
- Extract a user identifier from the dumped users table.
- Submit a crafted password on the user login page to log in as that user.
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 login form sends what you type into a database query. If the site builds that query by gluing your text straight in, special characters can change the query's meaning, which is called SQL injection. Here the attacker could make the database pause on purpose to confirm the flaw, then pull out whole tables and even log in as other people.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.