Bypassing the restrictions to load the Jupyter Notebook ipynb from organizations other than nasa on https://lb.gesdisc.eosdis.nasa.gov/meditor
The NASA meditor application restricted loading Jupyter Notebook files to the nasa GitHub organisation, but a path traversal in the URL parameter let an attacker load a notebook from any GitHub repository. Loading a malicious notebook resulted in cross-site scripting.
- Accepted in 9 days
- Fixed in 4 months
- Disclosed after 4 months
Summary by mateuszek
- First of all I found the NASA meditor website application
- Then I found the public Github repository related to NASA meditor
- Then I found the endpoint / url that should allow loading and displaying Jupyter Notebook
ipynbfrom Github (only from organizationgithub.com/nasa) - Then I bypassed it by adding
/../in the url parameter - that allowed me to load Jupyter Notebookipynbfrom the Github resources controlled by me - Then I loaded and displayed the infected Jupyter Notebook
ipynb, which resulted in XSS
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 application checked the GitHub organisation in the URL string but did not normalise the path, so a traversal sequence changed which repository was actually fetched.
Impact
An attacker could load a malicious notebook from their own GitHub account and execute script in the context of the NASA meditor site for anyone who viewed it.
What the attacker needed
Attacker-controlled GitHub repository; victim views the crafted notebook URL
How it was found
- Find the NASA meditor web application.
- Find its public GitHub repository.
- Find the endpoint that loads and displays Jupyter Notebook files from GitHub, restricted to the nasa organisation.
- Add a traversal sequence to the URL parameter to load a notebook from an attacker-controlled GitHub repository.
- Load the malicious notebook, which triggers cross-site scripting.
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.
The site had a feature that fetched a notebook file from GitHub, but it only wanted files from NASA's own GitHub account. By putting a special sequence of characters in the address, the author made the site fetch a file from a different account they controlled. That file contained code that ran in the browser of anyone viewing it, which is called cross-site scripting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.