A new benchmark finds that poisoned context can lead LLMs to propose AWS IAM policies with extra permissions. IAMRAGBENCH tests whether a generated policy can satisfy a task while also granting access beyond trusted authorization requirements.
The benchmark contains 60 cases covering permission scope, conditions, explicit denies, trust, permissions boundaries, and role delegation. A policy counts as an attack only if it remains provider-valid, preserves an intended request, and newly allows a forbidden one; formal validity alone is not enough.
Across five endpoints, directly included attacker-controlled context produced 46 goal-matched attacks among 292 cases (15.75%). An end-to-end BM25 search across 720 documents retrieved the designated poisoned content among the top five results for all 60 tasks, but produced 7 of 294 goal-matched attacks (2.38%). When the same weakening was framed as a final security-architecture exception, the frozen two-endpoint stress test recorded 74 attacks in 116 cases.
In a replay, AWS CheckNoNewAccess reported no new access for four of 168 goal-matched exact attacks. The benchmark’s full pre-deployment rule rejected all 171 exact authorization deltas and sent five unresolved cases for review. These results are limited to the benchmark and described tests; they do not establish how every IAM copilot behaves. The paper details the benchmark and its validation methods: arXiv: IAMRAGBENCH