XSS in Bootbox
All Bootbox dialogs are vulnerable to XSS injections, so passing user-controlled input can allow script execution on sites using Bootbox.
- Triaged in 18 days
- Fixed in 19 days
- Disclosed after 53 days
Hi.
Sorry for taking the time with this report.
This is already publicly disclosed issue at -https://github.com/makeusabrew/bootbox/issues/661
In essence all dialogs of bootbox vulnurable to XSS injections ( bootbox.alert("<script>alert(1);</script>"); )
This is apparently a feature to allow injecting HTML in messages but it is not very clear from the documentation.
Even though this issue has been reported for a while no changes were made to fix this issue or even update the documentation
Kind Regards,
Yoni
Impact
Websites using bootbox to display messages containing user input are vulnerable to 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 library inserts the message argument into the DOM as HTML without escaping or sanitising it, and this behaviour is undocumented.
Impact
Websites that pass user input into Bootbox dialogs could have attacker JavaScript executed in visitors' browsers.
What the attacker needed
Site passes user input to Bootbox; victim views the dialog
The fix
The issue remains unfixed and undocumented; escaping by default or documenting HTML rendering would help.
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.
Bootbox is a small JavaScript library that shows pop-up dialog boxes on a web page. The report says it treats the text you give it as HTML rather than plain text, so if a website passes something a user typed straight into a dialog, any script hidden in that text will run in the visitor's browser. That is called cross-site scripting (XSS): an attacker gets their code to run as if it came from the trusted site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.