Skip to content
SQL injection Write-up Intermediate

Discovering an Time-Based Blind SQL Injection in a Tamil Nadu Government Web Portal (TANGEDCO)

The password recovery form on a Tamil Nadu government portal passed a user-supplied registration code straight into an Oracle SQL query, so a crafted value could make the database pause. An attacker could use that timing signal to ask the database yes/no questions and slowly extract data.

infosecwriteups.com

Published on infosecwriteups.com

Recently, while performing security testing as part of a bug bounty program, I discovered an Oracle Time-Based Blind SQL Injection vulnerability in a web application’s password recovery functionality.

Karthikeyan.V, 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.

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

User input from the forgot-password form was concatenated into an Oracle SQL query instead of being sent as a bound parameter.

Impact

Because the injection is blind, an attacker could only infer data through timing, but depending on database permissions they could potentially extract sensitive records, enumerate tables and columns, bypass application logic and run further queries.

What the attacker needed

Reachable forgot-password form; Oracle-backed database; no account needed

The fix

The application should use parameterized queries or prepared statements and never concatenate user input into SQL, with least-privilege database accounts and a WAF as extra layers.

How it was found

  1. Open the forgot-password page and submit a normal registration code to see the baseline response time.
  2. Replace the registration code with a value that includes an Oracle delay function and submit the form.
  3. Observe that the response is consistently delayed by about five seconds.
  4. Repeat normal and injected requests several times to rule out network latency.

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.

SQL injection is when a website puts what you type into a database command without separating it from the command itself, so you can add your own instructions. In a blind attack the site shows no errors or data, so the attacker asks questions whose answer changes how long the page takes to load. Here a delay of about five seconds meant the injected instruction ran.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.