Skip to content
XSS Write-up Beginner

How I Offered Free 1 Lakh Rupees Through Government Website

The search form on a government website reflected user input without sanitisation, allowing an attacker to inject an HTML link. An attacker could craft a URL that, when visited, displayed a fake government offer and redirected the victim to a malicious site.

Krishnadev P Melevila Follow

Published on infosecwriteups.com

Hey Hackers, It’s Me Krishnadev P Melevila, a 19-Year-old self-learned cyber security researcher.

Krishnadev P Melevila, 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 search parameter was reflected into the page without HTML encoding, allowing arbitrary HTML to be rendered.

Impact

An attacker could use the trusted government domain to show fake offers and redirect victims to phishing or malicious sites, damaging the site's reputation.

What the attacker needed

Victim clicks a crafted link

The fix

The vulnerability was fixed by the National Informatics Center after the report.

How it was found

  1. Go to the website and find the search form.
  2. Enter an HTML link into the search field and submit.
  3. Observe that the link is rendered on the page.
  4. Copy the resulting URL, optionally shorten it, and send it to a victim.
  5. When the victim clicks the link, they see the fake offer and are redirected to a malicious page.

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.

HTML injection is when a website takes what you type and puts it directly into the page without cleaning it. Here, the search box let someone insert a clickable link that looked like part of the government site. A victim could be tricked into clicking it and taken to a scam page.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Krishnadev P Melevila

View all

18 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.