DOM-Based Non-Self on https://sservi.nasa.gov/
A DOM-based reflected XSS existed on a NASA-affiliated site because URL path data was inserted into the page without proper encoding. An attacker could craft a URL that, when pasted into the address bar, executed arbitrary JavaScript in the victim's browser.
Originally disclosed on Bugcrowd
- Accepted in 5 days
- Fixed in 2 months
- Disclosed after 2 months
Summary by AshmitSh4rma
Vulnerability Disclosure Report
DOM-Based Non-Self Reflected XSS on NASA-Affiliated Web Application
Target:
https://sservi.nasa.gov/ (NASA-affiliated website)
Vulnerability Type:
Cross-Site Scripting (XSS) → DOM-Based → Reflected → Non-Self
Description:
A DOM-based Reflected Cross-Site Scripting (XSS) vulnerability was discovered on the NASA-affiliated domain https://sservi.nasa.gov. The vulnerability allows remote execution of arbitrary JavaScript when a user accesses a specially crafted URL.
The XSS is non-self in nature—it does not rely on user-provided form inputs but instead executes by manipulating the browser’s URL path. This allows attackers to craft URLs that, when accessed by a victim, result in the browser executing malicious JavaScript in the context of the vulnerable domain.
Example payload (executed via URL path):
https://sservi.nasa.gov/<img src=x onerror=alert('bugcrowd:ashmitsh4rma')>
Although direct interaction like clicking the link might not execute the payload due to encoding, pasting the URL directly into the address bar triggers execution, demonstrating a live vulnerability in how the page parses and reflects path data into the DOM.
Impact:
- Arbitrary JavaScript Execution in the victim’s browser
- Session Hijacking, phishing, and unauthorized actions on behalf of the victim
- Potential for escalated impact if combined with other vulnerabilities on related NASA services
Exploitation Risks:
- Can be weaponized in phishing campaigns by embedding malicious links
- Bypasses input-based filters since the payload resides in the URL path
- Executed entirely client-side, reducing server-side detection opportunities
Resolution:
- The affected path-handling code was updated to sanitize and properly encode DOM-inserted values
- The vulnerability no longer triggers when the crafted payload is inserted into the URL
- Content Security Policy (CSP) may have been enhanced to mitigate future inline script execution risks
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the page inserted URL path data into the DOM without sanitising or encoding it.
Impact
An attacker could run arbitrary JavaScript in a victim's browser, potentially leading to session hijacking, phishing, or unauthorised actions, though clicking the link may not execute the payload due to encoding.
What the attacker needed
Victim pastes crafted URL into address bar
The fix
The affected path-handling code was updated to sanitise and properly encode DOM-inserted values, and CSP may have been enhanced.
How it was found
- Craft a URL with a script payload in the path.
- Paste the URL directly into the browser address bar.
- The payload executes in the context of the vulnerable domain.
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 report has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is when a website lets an attacker sneak JavaScript into a page that other people view. Here the page took part of the web address (the URL path) and put it into the page without cleaning it first, so a crafted address could run code. The attacker just needs the victim to open a special link.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.