Skip to content
Open redirect Write-up Intermediate

Breaking LLM Output Handling: How I Found an Open Redirect on a M

A chatbot's shared-conversation preview rendered AI-generated SVG content without sanitising hidden tags, so an embedded invisible iframe with a javascript: URI executed and opened an external site. This gave an open redirect triggered when a user clicked Edit then Preview on the shared link.

h4nin Follow

Published on medium.com

We all use AI chatbots every day. To make sharing easier, these platforms have a “Shared Conversations” feature.

h4nin, on medium.com

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 preview step rendered AI-generated SVG markup without sanitising embedded HTML elements such as iframes and javascript: URIs.

Impact

A viewer of a shared conversation could be redirected to an attacker-chosen external site, though the report only demonstrates a popup and was rated P3.

What the attacker needed

Access to the AI chatbot; ability to share a conversation; victim opens the shared link; victim clicks Edit then Preview

How it was found

  1. Prompt the chatbot to generate an SVG containing a hidden iframe with a javascript: URI.
  2. Share the conversation to obtain a public link.
  3. Open the shared link in a browser.
  4. Click Edit and then Preview to render the SVG.
  5. The hidden script runs and a popup opens to the external site.

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.

An SVG is an image format that can also contain interactive code, and a javascript: link is a link that runs code instead of opening a page. The chatbot let users share a chat, and when the shared page previewed the AI's image, it ran that hidden code and sent the viewer to another website. That kind of forced redirect is called an open redirect.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.