How I Bypass CSP that allow a iframe injection in a chat bot + HTML injection on emails
The chatbot on the target application rendered user-supplied URLs as iframe tags and displayed linked images, and the same content was included in emails sent by the chatbot. An attacker could inject an iframe or HTML content into the chatbot and have it appear in emails, potentially bypassing CSP restrictions.
Published on medium.com
I will share my latest my finding iframe injection in a chat bot which allows for htmli in emails
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could inject an iframe or HTML content into the chatbot, which then appears in emails sent by the chatbot, potentially bypassing CSP and enabling phishing or other attacks.
What the attacker needed
Access to the chatbot; a valid email address
The fix
The application should sanitise and validate user-supplied URLs before rendering them as iframes or including them in emails.
How it was found
- Visit the target application and locate the chatbot.
- Input a URL into the chatbot.
- Observe that the chatbot displays the URL as an iframe.
- Input a link to a JPG image and observe that the chatbot displays the image.
- Provide an email address to the chatbot and receive an email containing the injected content.
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 write-up has not been written yet. The Original tab links to the source.
A chatbot on a website took a web address that a user typed and showed it as an embedded frame (an iframe) on the page. The same content was then included in emails the chatbot sent. This means an attacker could make the chatbot display content from another site, which might be used to trick users or bypass security rules.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.