AI Threats
AWS Kiro Security Flaw: Prompt Injection Bypasses Safety Boundaries and Enables Silent Code Execution
Andrew Mason
July 31, 2026
Summary
Critical vulnerability discovered in AWS Kiro allowing silent code execution through prompt injection, posing risks to developers.

Introduction

In the evolving landscape of software development, AI-driven tools like AWS Kiro are revolutionizing how developers code and automate tasks. However, these advancements also come with new security challenges. Recently, a critical vulnerability was discovered in AWS Kiro, an agentic IDE, highlighting significant security flaws that can lead to silent code execution on developer machines. This post delves into the intricacies of the vulnerability, its impact, and how it can be mitigated.

What is AWS Kiro?

Kiro is an AI-powered Integrated Development Environment (IDE) designed to facilitate efficient software development. It offers automation in coding tasks, file handling, and command execution. Due to its powerful capabilities and integration with various tools, any security weakness in Kiro could become a substantial threat to a developer's system and beyond.

Why Does a Code-Execution Flaw in Kiro Matter?

The primary concern with the Kiro flaw lies in how it bypasses fundamental safety boundaries that are supposed to require user approval before executing potentially dangerous actions. This flaw fundamentally undermines the security model, leaving systems vulnerable to silent exploitation.

Understanding the Flaw: Prompt Injection and MCP Configuration

How Prompt Injection Works

The essence of the vulnerability lies in the manipulation of Kiro’s Model Context Protocol (MCP) configuration file. Typically, this file, located at ~/.kiro/settings/mcp.json, holds the list of external tools that Kiro uses. Under normal circumstances, Kiro requires explicit approval from users before executing risky operations like modifying this configuration.

However, through prompt injection, hidden instructions embedded in web pages that Kiro reads can rewrite the MCP file without user consent. This enables attackers to add malicious servers that Kiro will unconsciously auto-load and execute.

The Attack Chain: From Poisoned Web Page to Code Execution

  1. Initiation: A developer asks Kiro to fetch or summarize a web page.
  2. Injection: The web page contains hidden malicious instructions that Kiro processes, instructing it to rewrite its MCP configuration.
  3. Execution: Without any prompt for user approval, Kiro modifies the MCP file, adding attacker's entries, which initiates arbitrary code execution every time Kiro reloads or starts.

Safety Boundary Bypass: Autopilot vs. Supervised Mode

Kiro operates in two modes:

  • Autopilot Mode: Default setting, where actions are executed automatically.
  • Supervised Mode: Requires user approval for critical actions.

The vulnerability exploits the Autopilot mode, where safety controls are weaker, allowing the injected prompts to enact changes without the user's knowledge.

Real-World Attack Surface

Potential vectors for injecting malicious prompts include:

  • Compromised Documentation: Attackers control or infiltrate documentation websites.
  • Intercepted API Responses: Middleware attacks change genuine responses to carry malicious payloads.
  • Misused Search Results: Injected content into legitimate search snippets or GitHub documentation.

Each route represents a median through which vulnerabilities can be introduced into the development environment.

Impact Assessment: What Attackers Can Do

Once this flaw is exploited, attackers gain full control over the developer’s machine:

  • Credential Theft: Extract SSH keys, cloud credentials, and API tokens.
  • Source Code Exfiltration: Access proprietary codebases and git repositories.
  • Persistence: Install persistent mechanisms to survive reboots.
  • Lateral Movements: Use captured credentials to infiltrate connected networks and systems.

Vulnerability History in Kiro

This isn't Kiro's first issue; similar security lapses have marked its history. Past vulnerabilities also involved unsafe MCP configurations. This points to a pattern of partial fixes that necessitate more rigorous safety enhancements.

Detection: Identifying Compromise Attempts

Practical Signals to Monitor

  • File Changes: Regularly check ~/.kiro/settings/mcp.json for unauthorized modifications.
  • Unusual Processes: Monitor new subprocess launches initiated by Kiro, potentially indicating uncompromised activity.
  • Network Activity: Watch for irregular outbound connections made by Kiro.

Remediation: Immediate Steps

  1. Immediate Update: Upgrade to Kiro version 1.0.x or apply the v0.11.130+ patch.
  2. Credential Audit: Assume credential compromise and rotate keys and passwords.
  3. Deployment Review: Check recent commits and server changes for signs of unauthorized access.

Mitigation Strategies for Unpatched Versions

If immediate updates aren't possible:

  • Switch to Supervised Mode: Require user approval for all actions.
  • Restrict Web Access: Use proxies to limit allowed web requests.
  • Monitor File Integrity: Implement monitoring on crucial configuration files to detect changes.

Broader Supply-Chain and Developer Security Implications

This vulnerability underscores the need for comprehensive security strategies in handling AI-driven development tools. It’s essential to ensure all agentic tools are identified, monitored, and consistently updated to prevent breaches and protect sensitive developer environments.

Conclusion

AWS Kiro's prompt injection vulnerability is a serious threat that reflects the broader risks associated with AI-powered development utilities. Organisations must stay vigilant, ensuring robust detection and mitigation strategies are in place as AI continues to transform the development landscape.

FAQs

Does the PoC prove active exploitation in the wild?
The PoC is only a proof-of-concept. No known active exploitation has been reported, but precautionary updates are advised.

Can I detect if my Kiro instance was exploited before I patched?
Check for unusual entries in the MCP config file and monitor historical logs for any odd requests or processes.

Why didn't Kiro get a CVE immediately?
The absence of an early CVE highlights a gap in immediate vulnerability recognition by automated tools, which are crucial for timely detection.

Should I restrict my developers' Kiro usage?
While not necessary, enforcing updates, disabling unnecessary web access, and supervising mode use can enhance security without severely limiting functionality.

What happens to my data if Kiro is compromised?
The entire developer's environment becomes vulnerable, risking exposure of source code, credentials, and other sensitive information.

Is this a Kiro-only problem?
No, similar vulnerabilities might exist across various AI-driven developer tools. Vigilance, proper auditing, and regular updates remain crucial defenses.

Andrew Mason

Andrew is an entrepreneur and technology leader with a strong track record of building, scaling, and exiting high-growth technology businesses. He is the founder of several award-winning companies including RandomStorm, Data Protection People, RapidSpike, Pentest People, and DarkInvader, each operating at the forefront of cybersecurity, risk management, and digital resilience. Across these ventures, Andrew has consistently focused on creating commercially successful businesses grounded in deep technical capability and clear market need.

Sign Up for Your Free Account

Unlock full visibility of your external attack surface with DarkInvader’s continuous, real-time monitoring. Create your free account to discover unknown assets, detect emerging risks and stay ahead of potential threats before attackers can exploit them.

Create My Free Account