AWS Kiro: Arbitrary Code Execution via Indirect Prompt Injection
AWS Kiro was vulnerable to indirect prompt injection, allowing a remote attacker who controls data processed by Kiro to hijack it into running arbitrary operating system commands or writing and running custom code. Two attack paths enabled this.
embracethered.com
Published on embracethered.com
On the day AWS Kiro was released, I couldn’t resist putting it through some of my Month of AI Bugs security tests for coding agents.
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 coding agent trusted and acted on instructions embedded in data it processed without separating them from the user's own instructions.
Impact
A remote attacker could hijack Kiro to run arbitrary operating system commands or write and run custom code.
What the attacker needed
Attacker controls data Kiro processes
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.
AWS Kiro is an AI coding assistant that reads data such as files or web content and then acts on it. Indirect prompt injection means an attacker hides instructions inside that data, so the AI follows the attacker's instructions instead of the user's. Here this let the attacker make Kiro run commands on the user's computer.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.