Skip to content
XSS Write-up Beginner

How I Turned NASA’s Search Bar into a Phishing Gateway

The search parameter on NASA's website reflected user input without encoding, allowing an attacker to inject HTML into the results page. An attacker could place a link on NASA's trusted domain that leads users to a phishing or malware site.

medium.com

Published on medium.com

Here is the free version: “https://myselfakash20.medium.com/how-i-turned-nasas-search-bar-into-a-phishing-gateway-697de30859b0?sk=2ff8fd64ba79a170b1a23d7038b41607”

Akash Ghosh, on medium.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's value was written into the results page without HTML encoding, so injected markup was rendered as part of the page.

Impact

An attacker could craft a nasa.gov link that shows a convincing link in the results, potentially leading users to phishing pages or malware; the author states the issue was reported but does not confirm a fix.

What the attacker needed

Victim clicks a crafted nasa.gov search link

The fix

The site should validate input and encode output so that search terms are displayed as text rather than rendered as HTML.

How it was found

  1. Open NASA's official website.
  2. Enter an HTML link tag in the search bar.
  3. View the search results, where the injected link is displayed.
  4. Click the injected link text and get redirected to the chosen external site.

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 website's search box should treat whatever you type as plain text. Here, the site put the typed text straight into the page as code, so a crafted search link could make a clickable link appear on NASA's own page. Because people trust nasa.gov, they might click that link and end up on a fake login page.

What is XSS?

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

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.