# Excessive service-role delegation

A restricted principal can cause an allowed service to execute with a more powerful role than the application contract permits.

**Candidate CWE:** [CWE-266](https://cwe.mitre.org/data/definitions/266.html)

## Test hypothesis

In an isolated owned account, compare one disposable canary-only job using its intended role with the same job using the excessive role. Check service create/update permission, role trust and resource permissions together. On GCP, assess workload-create/update permission together with service-account attachment (actAs) and the selected account's resource grants; do not equate actAs with Token Creator.

## Evidence required

Starting identity, role selection, accepted service operation, generated job identity and synthetic metadata access that the starting identity cannot perform.

## Rule out false positives

PassRole permission without a usable service operation, incompatible role trust, or intended administrative delegation. PassRole has no standalone API audit event.

## Playbook and command references

- [Cloud IAM: trust, delegation and effective permissions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/cloud-iam-boundaries.html) — Prove which principal can act on which resource, including cross-account trust, delegated roles and workload federation.
- [Azure and GCP: identity, delegation and storage access](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/azure-gcp-boundaries.html) — Apply provider-specific controls for Azure management/data permissions and SAS, plus GCP service accounts, federation and object ACLs.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Cloud%20IAM%3A%20trust%2C%20delegation%20and%20effective%20permissions)

## Referenced by these target playbooks

[Cloud & containers](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/cloud.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [AWS PassRole requirements and audit behavior](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
- [GCP service-account roles](https://docs.cloud.google.com/iam/docs/service-account-permissions)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
