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.
This write-up is published strictly for educational and awareness purposes and to share knowledge with security researchers and the wider cybersecurity community.
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
- Register and log in to the application.
- Open the page source and search for hidden input patterns.
- Discover the hidden popup_flag parameter.
- Submit the form and intercept the request.
- Manually add the popup_flag parameter with a test value.
- 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.