Skip to content
SQL injection Write-up Beginner

Accessing Thousands Of Covid 19 Patients Confidential Information Cve 2020 35276

The admin login page of a government Covid-19 portal was vulnerable to SQL injection in the username field, allowing authentication to be bypassed without valid credentials. The attacker could then view confidential information of thousands of patients, including names, mobile numbers, addresses, treating doctors and hospitals.

rootxy4sh Follow

Published on infosecwriteups.com

In this section, I will explain you, how i was able to bypass the Covid-19 portal of Chandrapur ( Maharashtra ) Government & from which it leads to full admin access control of Dashboard. There was Confidential Information of thousands of Covid-19 patients such as their Name with Mobile Number, Some Addresses, Dr Name…

rootxy4sh, 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

Likely the login form built its database query by joining user input directly into the SQL string, so a crafted username altered the query's logic instead of being treated as plain text.

Impact

An attacker could bypass the admin login and view confidential data of thousands of Covid-19 patients, including names, mobile numbers, addresses, doctors and hospitals.

What the attacker needed

Reachable admin login page; valid verification code entry

The fix

The issue was resolved according to the timeline, though the text does not describe the fix; it should be fixed by using parameterised queries so input cannot change the query's logic.

How it was found

  1. Open the admin login page of the portal.
  2. Enter a crafted username that makes the login condition always true, plus any random password.
  3. Enter the verification code shown on the page and submit the login form.
  4. The server accepts the login and the admin dashboard opens without valid credentials.

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 usually checks your username and password against a database. Here the site pasted whatever was typed into the username box straight into that database query, so a specially crafted username could trick the database into treating the login check as always true. That let the researcher get into the admin dashboard without knowing any password.

What is SQL injection?

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

More by rootxy4sh

View all

1 more disclosed report, best first.

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.