External authentication prompt injection via unsafe remote file include at https://ctms.prod.mozilla-ess.mozit.cloud/docs
The documentation page loads remote YAML/JSON files from an arbitrary URL supplied in the 'url' parameter, allowing an attacker to host a fake authentication prompt. A victim who enters credentials into that prompt sends them, along with their IP address, to the attacker's server.
Originally disclosed on Mozilla
- Fixed in 6 days
- Paid in 18 days
- Disclosed after 6 days
Good day, I truly hope it treats you great on your side of the screen :)
I have found that your have a site which is vulnerable to a remote file include to an arbitrary host - in this case, I am able to load my own content from todayisnewpoc.surge.sh.
There is sanitization of the data being loaded from todayisnewpoc.surge.sh, which can prevent some common attack vectors/know payloads, but I am still able to inject a custom authentication prompt which loads when visiting the page.
This prompt is being served from an arbitrary location (authorization.site), which can be modified as needed to be as convincing as possible to any possible victim. Imagine yourdomain.authorization.site, for example. Depending on the browser being used, a message can be included along with the prompt to make it seem more trustworthy.
When a victim enters their information into the prompt, it is sent to the arbitrary location being used by the attacker (authorization.site) along with their IP address, and stored in plain text for the attacker to use when desired.
Additionally, if the victim closes the first prompt, an attacker can serve arbitrary text on the page to encourage them to authorize. If they do so by clicking on the Authorize button, then clicking on the subsequent Authorize button, the victim will again be shown my external authentication prompt from authorization.site
POC:
https://ctms.prod.mozilla-ess.mozit.cloud/docs?url=https://todayisnewpoc.surge.sh/auth2.yaml
How to fix: Restrict the ability to load external json/yaml files via the configUrl and url parameters, or implement an allowed-list for domains which can load via these parameters.
May you be well on your side of the screen :)
-Eric
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 accepts an arbitrary URL in the 'url' parameter and loads remote YAML/JSON content without restricting it to trusted domains.
Impact
An attacker could steal credentials and IP addresses from users who interact with the fake prompt, though some common attack payloads are blocked by sanitisation.
What the attacker needed
Victim clicks a crafted link; attacker hosts a malicious YAML file
The fix
The application should restrict loading of external JSON/YAML files via the configUrl and url parameters, or implement an allow-list of permitted domains.
How it was found
- Host a malicious YAML file on an attacker-controlled domain.
- Craft a link to the documentation page with the 'url' parameter pointing to that file.
- Send the link to a victim; the page loads the attacker's content and shows a fake authentication prompt.
- The victim enters credentials, which are sent to the attacker's server along with their IP address.
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 has a documentation page that can be told to fetch a configuration file from any web address. The attacker points it at their own server, which serves a fake login box. When a visitor types their details into that box, the details go straight to the attacker.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.