Case · DiggingBeagle record

Poisoned reference text steered AI-generated AWS policies toward excess rights

IAMRAGBench demonstrates a permission-escalation route through retrieved documentation rather than invalid syntax or a direct user request.

Public disclosure: Nov 3, 2026

Scope

Controlled AWS IAM generation benchmark with injected documents; no verified live account deployment or exfiltration.

Assessment profile

Assessment method
Setting
evaluation
Exploitation
demonstrated
Evidence
Grade B
Remediation
mitigation available
AI role
AGAINST AI
Basis and provenance

The study specifies authorization envelopes, positive and forbidden probes, provider validity, exact deltas, and separate retrieval regimes. The evidence supports controlled policy artifact drift, not observed AWS account compromise. Independent policy-diff enforcement is a plausible mitigation but not a universally tested product patch.. Impact is ungraded because no independently measured production-target impact or victim scope is established by this record.

Assessed Nov 4, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Insert policy advice into retrieval

    The attacker controls a lower-trust reference snippet encountered during the agent’s legitimate cloud-policy generation task.

    Boundary: Retrieved documentation to model context

  2. 02

    Steer policy semantics

    The model adopts broader authorization suggestions while still constructing an IAM policy accepted by the provider grammar.

    Boundary: Untrusted examples to security-critical authorization design

  3. 03

    Deliver an overbroad permission artifact

    A valid policy grants actions or resources beyond the legitimate task even if no one executes the policy during the experiment.

    Boundary: Generated configuration artifact to real cloud authority on deployment

Claims & evidence

CLM-NOV04-IAM-RAG-POLICY-1The researchers report that 46 of 292 eligible included-context attempts reached an attacker-selected permission-expansion goal.supported

Basis: reported finding

Link to claim
CLM-NOV04-IAM-RAG-POLICY-2The attack targets excessive permissions in provider-valid generated IAM policy output rather than relying on malformed policy syntax.supported

Basis: reported finding

Link to claim
CLM-NOV04-IAM-RAG-POLICY-3With end-to-end BM25 retrieval, the designated poison was retrieved for all 60 tasks but only 7 of 294 eligible endpoint-case runs met the exact attacker-goal authorization test, versus 46 of 292 in the direct included-context condition.supported

Basis: reported finding

Link to claim

Implications

Schema validation cannot replace semantic least-privilege verification. A generated IAM document needs independent policy analysis, diff to an approved privilege envelope and human authorization before application.

Controls and mitigations

  • Compare generated actions/resources to a machine-readable minimum-privilege specification.
  • Run cloud IAM simulation and prohibit wildcard or privilege-escalation grants unless explicitly approved.
  • Treat retrieved examples as untrusted data and retain exact document provenance.
  • Compare generated IAM policies against a separately specified authorization envelope using allow and deny probes before deploying any provider-valid policy.

Unknowns and contradictions

  • Production effectiveness of the attacker snippets and downstream cloud incidents are unmeasured in the cited benchmark.
  • Some tested cases may depend on whether the malicious snippet is included in retrieval context.

Sources and citation

Material revision history

  1. Nov 4, 2026 · Published version · first publication · revision 217