Forcing an AI App to generate Payloads to Cause HTML Injection
The AI chatbot's output was rendered as HTML without proper sanitisation, so an attacker could ask the model to produce an image tag pointing to an external domain. This caused the victim's browser to load the image and make a request to the attacker's server, confirming HTML injection.
osintteam.blog
Published on osintteam.blog
Hi everyone, in this article, I’ll walk through a recent penetration test I conducted against a custom-built AI chatbot. As usual, we’ll cover:
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 cause the victim's browser to load content from an external domain, confirming HTML injection; the text does not show script execution or account takeover.
What the attacker needed
Access to the chatbot interface
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.
When a website shows text from a user or a chatbot, it should treat it as plain text, not as code. Here the chatbot's reply was inserted into the page as HTML, so a crafted request made the page load an image from a server the attacker controls. That request tells the attacker the injection worked.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.