Indirect prompt injection hides malicious instructions in content an assistant processes, such as documents, emails, code, or database records. The assistant may treat the content as data while following its embedded commands. The content can come from a compromised account, an insider, or a well-meaning colleague. section 4.5.1
Coding-assistant incidents show how processing ordinary project content can trigger harmful actions:
- Hidden instructions in GitLab project files, merge request descriptions, and issue comments led Duo to add malicious links and send private source code to attacker-controlled servers. section 4.5.1
- A malicious file prompted Amazon Q to read API keys and leak them through a DNS request when a developer asked for an explanation. section 4.5.1
- A disclosed “Rules File Backdoor” showed that configuration files for GitHub Copilot and Cursor could create a more persistent attack path. section 4.5.1
