Cross-site Scripting in BookStack
Iframe tags in BookStack lacked a sandbox attribute, allowing an attacker to execute malicious JavaScript through an iframe and conduct phishing attacks. Adding the sandbox attribute would block script execution and prevent the content from navigating its top-level browsing context.
bookstackapp/bookstack
Originally disclosed on huntr
Iframe tags don't have a sandbox attribute, this makes an attacker able to execute malicious javascript via an iframe and perform phishing attacks. The sandbox attribute will block script execution and prevents the content to navigate its top-level browsing context which will stop this type of attack.
From the GitHub Advisory Database (GHSA-5rcc-6cmj-7728, CC BY 4.0).
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, iframe elements were rendered without the sandbox attribute, so embedded content could execute scripts and navigate the top-level page.
Impact
An attacker could execute malicious JavaScript via an iframe and perform phishing attacks.
What the attacker needed
Ability to embed an iframe in content
The fix
Iframe tags should be given a sandbox attribute to block script execution and prevent navigation of the top-level browsing context.
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.
An iframe is a way to embed another web page inside a page. Without a security setting called sandbox, the embedded page can run scripts and try to take over the whole browser tab. This report says that missing setting let an attacker run harmful code and trick users.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.