Skip to content
XSS Write-up Beginner

How a Simple Google Dork Led Me to Find Reflected XSS & HTML Injection on NASA and Earn a Letter of…

A hidden parameter named popup_flag was reflected into the HTML response without encoding, allowing an attacker to break out of the attribute context and inject arbitrary HTML and JavaScript. This enabled reflected cross-site scripting and HTML injection, which could execute script in a victim's browser or display fake content on a NASA domain.

ItsS4LEH Follow

Published on medium.com

This write-up is published strictly for educational and awareness purposes and to share knowledge with security researchers and the wider cybersecurity community.

ItsS4LEH, 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 application reflected the popup_flag parameter into an HTML attribute without encoding or validating it, allowing the attribute context to be broken.

Impact

An attacker could execute arbitrary JavaScript in an authenticated user's browser, inject fake login forms or links for phishing, and access non-HttpOnly cookies, though the session cookie was protected by HttpOnly.

What the attacker needed

A free account; victim clicks a crafted link

The fix

The vulnerability was fixed by NASA, as confirmed in the timeline.

How it was found

  1. Register and log in to the application.
  2. Open the page source and search for hidden input patterns.
  3. Discover the hidden popup_flag parameter.
  4. Submit the form and intercept the request.
  5. Manually add the popup_flag parameter with a test value.
  6. Use a double quote and greater-than to break out of the HTML context, then insert a payload and submit.

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 hidden parameter is a value in a web page's code that users don't normally see or send, but the server still processes it. The server took the value of this parameter and placed it directly into the page without cleaning it, so an attacker could add their own HTML or JavaScript. This let them run code in a victim's browser or show fake messages on a real NASA 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 ItsS4LEH

View all

2 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.