How AI Chat Bot Help Me To Hack The Website
An image upload feature in a chatbot accepted SVG files and served them from a generated URL, so JavaScript inside the SVG ran in the browser. The author also claims the file was cached, making the script persist for anyone opening the link, and that an SVG could redirect visitors to another site.
Today, I want to share how I discovered a web vulnerabilities in AI chat bot ,I came across a target let’s call it example.com which featured an interactive chatbot with an image upload functionality. The chatbot allowed users to upload images and then generated a unique URL for the uploaded file.
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
Root cause
Likely the upload service accepted SVG files and served them from its own domain without sanitising or forcing a download, so embedded script ran in the site's origin.
Impact
Anyone opening the generated link could have JavaScript run in the site's origin, and the author claims the cached file would keep doing this for later visitors and could redirect them to another domain for phishing.
What the attacker needed
Access to the chatbot upload feature; victim opens the generated file link
How it was found
- Try uploading a PHP web shell to the image upload feature.
- Craft an SVG file containing JavaScript and upload it.
- Open the generated URL for the uploaded file and observe the script run.
- Intercept the request for the link and note that the file is cached.
- Upload an SVG that redirects the browser to another site and open its URL.
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 website let people upload pictures, and it also accepted a picture format called SVG that can carry small programs. Because the site handed back a link that ran those programs in the visitor's browser, anyone opening the link could have code run on their behalf. The author also says the file was cached, meaning the site stored a copy and kept serving it to later visitors.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.