**New prompt injection attack on ChatGPT web version. Markdown images can steal your chat data.**
A prompt injection attack on ChatGPT's web version uses a copied text that secretly includes a malicious prompt, causing ChatGPT to append a single-pixel markdown image whose URL contains sensitive chat data, which is then sent to an attacker's server. The attack can optionally persist to exfiltrate future prompts.
Published on systemweakness.com
It uses single-pixel image that steals your sensitive chat data and sends it to a malicious third-party. Full PDF-version — https://kajojify.github.io/articles/1chatgptattack.pdf
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 combination of ChatGPT's support for markdown images and its susceptibility to prompt injection, allowing attacker-controlled text to make the model include sensitive data in image URLs.
Impact
Sensitive data such as full prompts, code, passwords, and API keys could be leaked; phishing links could be inserted; and outputs could be polluted with garbage images, though the attack's success is limited by ChatGPT's nondeterministic output and other factors.
What the attacker needed
Victim visits attacker's website; victim copies text from the site; victim pastes into ChatGPT; ChatGPT follows injected prompt
The fix
OpenAI should not allow ChatGPT to reply with images in markdown, and users should check what they paste.
How it was found
- A user visits an attacker's website and copies some text.
- Attacker's JavaScript intercepts the copy event and injects a malicious prompt into the copied text.
- The user pastes the poisoned text into ChatGPT.
- The malicious prompt asks ChatGPT to append a single-pixel markdown image with sensitive chat data as a URL parameter.
- When the image loads, the sensitive data is sent to the attacker's server via a GET request.
- Optionally, the prompt can make ChatGPT add the image to all future answers, stealing future prompts.
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.
This attack tricks ChatGPT into including a hidden image in its reply. The image's web address contains private information from your chat, so when your browser loads the image, that information is sent to the attacker. It works because ChatGPT follows instructions hidden in text you copy and paste, and because it displays images from links.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.