Amazon Q Developer: Remote Code Execution with Prompt Injection
The Amazon Q Developer VS Code extension was vulnerable to indirect prompt injection, allowing an attacker to run arbitrary commands on the host without the developer's consent. The impact matched a Microsoft Copilot CVE, though AWS did not issue a CVE when patching it.
embracethered.com
Published on embracethered.com
The Amazon Q Developer VS Code Extension (Amazon Q) is a popular coding agent, with over 1 million downloads.
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 trusted instructions found in content it processed and executed resulting commands without sufficient confirmation from the user.
Impact
An adversary could run arbitrary commands on the host without the developer's consent; the text does not describe any defence that limited the exploit.
What the attacker needed
Amazon Q VS Code extension installed; AI processes attacker-influenced content
The fix
The vulnerability was patched, though the text does not describe the fix and notes AWS did not issue a CVE.
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 coding assistant extension for a code editor could be tricked by text it reads (such as comments or files) into running commands on the developer's computer. This is called indirect prompt injection: the attacker does not talk to the AI directly but plants instructions where the AI will read them. The result is that harmful commands run without the developer agreeing.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.