Attack scenario · AI security

AI agent with excessive AWS permissions

Can an AI agent with broad IAM permissions compromise an AWS account? An operations agent that can call AWS APIs runs under a broad role. Manipulated input causes it to make changes no human approved.

Fictional, educational scenarioUnauthorized actionsPrivilege takeoverData exposureLast updated · ATT&CK v20.1

Attack path · 4 stages

  1. 1

    Deliver instructions to the agent

    T1698AML.T0051.001

  2. 2

    Agent invokes a privileged tool

    T1059.009AML.T0053

  3. 3

    Change permissions or exposure

    T1098.003T1098.001

  4. 4

    Attacker acts directly

    T1078.004T1530

For leadership

Executive summary

AI agents are increasingly given the ability to act — open tickets, restart services, query databases, change cloud resources. Whatever an agent can do, anyone who can influence its input may be able to make it do. When an agent runs with a broad cloud role "so it can help with anything", a single manipulated message, email or document can trigger real changes in production. The blast radius of an AI agent is set by its permissions, not by its intentions. Leaders should require that every agent has its own narrowly scoped identity, that consequential actions need human approval, and that every action is traceable to the person who requested it.

For engineers

Technical summary

A Bedrock agent action group invokes a Lambda function whose execution role has broad permissions (for example iam:*, s3:*, ec2:*). Prompt injection (direct or indirect) leads the agent to call the tool with attacker-chosen parameters (ATLAS AML.T0053). The resulting API calls appear in CloudTrail as the Lambda role, not the requesting user.

Environment and assumptions

Fictional company: a "cloud-ops assistant" lets engineers ask for routine tasks in chat. Its single action-group Lambda runs with a role that has PowerUserAccess plus iam:PassRole, chosen during a prototype and never reduced. The assistant also summarizes incoming alert emails.

  • The adversary can send an email that the assistant will summarize (indirect injection) or has access to the chat (direct injection).
  • Tool calls are executed without human confirmation.
  • Fictional and simplified for education; no specific product vulnerability is implied.

Interactive

Attack sequence

Select a stage, or use the arrow keys, to see preconditions, evidence and controls.

Stage 1

Deliver instructions to the agent

An "alert" email contains instructions telling the assistant to make a configuration change as part of remediation.

Preconditions
  • Agent processes untrusted email content
Required access
  • Ability to send email to the monitored mailbox.
Potential evidence
  • Model invocation logs; mailbox logs
Defensive controls
  • Restrict tool invocation after reading untrusted content
Text version of the attack sequence
  1. Deliver instructions to the agent (T1698; AML.T0051.001). An "alert" email contains instructions telling the assistant to make a configuration change as part of remediation. Preconditions: Agent processes untrusted email content. Evidence: Model invocation logs; mailbox logs. Controls: Restrict tool invocation after reading untrusted content.
  2. Agent invokes a privileged tool (T1059.009; AML.T0053). The agent calls its AWS tool with parameters taken from the email. Preconditions: Tool exposes generic AWS operations; No human approval step. Evidence: Agent trace / tool-call logs; CloudTrail: calls by the action-group Lambda role. Controls: Narrow, task-specific tools rather than generic API passthrough; Human approval for changes.
  3. Change permissions or exposure (T1098.003, T1098.001). The tool modifies a role trust policy or creates credentials, giving the attacker direct access. Preconditions: Agent role has IAM write permissions. Evidence: CloudTrail: UpdateAssumeRolePolicy / CreateAccessKey by the agent’s Lambda role. Controls: No IAM write for agent roles; Permission boundary on agent roles.
  4. Attacker acts directly (T1078.004, T1530). Using the new access, the attacker reads data or makes further changes without involving the agent. Preconditions: Previous step succeeded. Evidence: CloudTrail activity from new principals. Controls: Alerting on IAM changes by non-human identities.

Technique mapping

MITRE ATT&CK and ATLAS techniques referenced in this scenario
IDTechniqueTactics (official)Stages
T1698Indirect Prompt InjectionExecution1
T1059.009Command and Scripting Interpreter: Cloud APIExecution2
T1098.003Account Manipulation: Additional Cloud RolesPersistence, Privilege Escalation3
T1098.001Account Manipulation: Additional Cloud CredentialsPersistence, Privilege Escalation3
T1078.004Valid Accounts: Cloud AccountsInitial Access, Persistence, Privilege Escalation, Stealth4
T1530Data from Cloud StorageCollection4
AML.T0051.001LLM Prompt Injection: Indirect (MITRE ATLAS)ATLAS: 1 tactic1
AML.T0053AI Agent Tool Invocation (MITRE ATLAS)ATLAS: 3 tactics2

Technique names and tactic assignments come from the imported MITRE data. Mapping a stage to a technique is Securitain’s analysis.

Why the attack can succeed

  • The agent’s role was sized for a prototype ("make it work"), not for its production tasks.
  • Tool calls were authorized by the model’s decision rather than by policy or a human.
  • CloudTrail attributes actions to the agent role, hiding which user or input triggered them.

What prevents or limits the attack

What may detect the attack

Detection signals and telemetry sources
SignalTelemetry sourceNotes
IAM or security-configuration changes by agent execution rolesCloudTrail management eventsThese should be rare or impossible; alert on any.
Tool calls with parameters derived from untrusted contentAgent trace / tool-call audit log—
Mapping of each tool call to the human requesterApplication audit log with session tags in CloudTrail—

Telemetry only helps if it is enabled before the incident and someone acts on it. Listing a signal here does not mean it is collected or monitored in your environment.

What Securitain may assess

  • Securitain can assess todayEffective-permission view that considers managed, inline, group, boundary and SCP policies together. Learn more
  • Securitain can assess todayPrivilege-escalation risk analysis for supported combinations such as iam:PassRole with Lambda, EC2, ECS or CloudFormation. Learn more
  • Securitain can assess todayDetection of identities with sensitive permissions such as broad S3 access, KMS decrypt or Secrets Manager reads. Learn more
  • Outside Securitain’s current scopeSecuritain does not perform prompt-injection testing, agent execution tracing or AI-specific scanning. It can review the AWS IAM permissions an agent’s role holds, which bounds what a manipulated agent could do.

For leadership

Executive implications

integrity
Production infrastructure or access can be changed without human intent.
confidentiality
Access created through the agent can expose data.
compliance
Changes lack an accountable approver, weakening change-management evidence.

No financial loss estimates are given; impact depends on the data, contracts and regulation involved.

Next steps

  1. Inventory every AI agent and the IAM role(s) its tools use.
  2. Remove IAM write and wildcard permissions from agent roles.
  3. Add human approval for any change-making tool.
  4. Propagate requesting-user identity into tool calls and logs.
  5. Use the AI Agent Security Self-Assessment to find remaining gaps.

References

MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation. ATT&CK data © 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (ATT&CK v20.1). MITRE ATLAS™ data (v2026.10) © MITRE, used under the Apache License 2.0. Securitain is not affiliated with or endorsed by MITRE. Explanations, scenarios and control mappings on this page are Securitain’s own analysis. Sources and licensing

Stay in the loop

Cloud security insights, early access & compliance updates

Weekly InsightsEarly AccessExpert Content
No spam, everUnsubscribe anytimeWeekly updates
Chat with Securitain