Skip to content
XSS Write-up Intermediate

How I Hacked NASA and Defaced It

A NASA development subdomain exposed a Swagger-documented endpoint that stored user-supplied content and served it back as HTML without sanitisation. An attacker could host convincing phishing or defacement pages on the trusted nasa.gov domain.

medium.com

Published on medium.com

Hey there, fellow bug hunters! I’m thrilled to share my story of how I went from dreaming about finding a vulnerability in NASA to actually making it happen — and earning a coveted Letter of Appreciation from them!

Shafayat Ahmed Alif, 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

Impact

An attacker could host phishing pages, fake login portals, malicious scripts, misinformation, or fake financial pages on a trusted nasa.gov subdomain, potentially bypassing email filters and deceiving users.

What the attacker needed

Internet access; no account needed

The fix

The issue was resolved after the report; the text does not describe the specific fix.

How it was found

  1. Enumerate subdomains and filter for live hosts.
  2. Compare new subdomain results with an older list to find newly added hosts.
  3. Fuzz a newly added development subdomain for hidden paths.
  4. Open the discovered Swagger API documentation page.
  5. Send a POST request with a JSON message to the store endpoint and receive a hash.
  6. Visit the store URL with the hash and observe the input rendered as a web 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.

A web server accepted text from a user, saved it, and later showed it back as a normal web page. Because the server did not check what was saved, someone could save a fake login page or a fake warning page and share the link. Visitors would see it on a real NASA address and might trust it.

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.