Skip to content
AI / LLM Write-up Intermediate

Amazon Q Developer for VS Code Vulnerable to Invisible Prompt Injection

The Amazon Q Developer VS Code extension would interpret invisible Unicode Tag characters in text as instructions, letting an attacker hide a prompt injection that the AI follows. This could be used to invoke tools and other actions on the user's behalf.

embracethered.com

Published on embracethered.com

The Amazon Q Developer VS Code Extension (Amazon Q) is a very popular coding agent, with over 1 million downloads.

The author, on embracethered.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 extension passed raw text to the language model without stripping or normalising invisible Unicode Tag characters, so hidden instructions reached the model as if they were normal content.

Impact

An attacker could hide instructions the user cannot see, and the AI could then invoke tools and take other actions, though the text does not show a full end-to-end exploit in this post.

What the attacker needed

Amazon Q Developer VS Code extension; attacker-controlled text the AI reads

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 AI coding assistant reads text from files and web pages to help you. This report shows that someone could hide secret instructions in that text using special characters that look like nothing on screen, so you would not notice them, but the AI would read them as commands. The AI could then be tricked into doing things the attacker wants.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.