T05 · Unauthorized Access and Privilege Escalation
- Location
references/cloud-api-operations/references/calling-methods.md:132- Finding
Persistent Cloud Role Privilege Expansion Without Mandatory Per-Change Confirmation
- Content
View full analysis
Vulnerability Details
File Location:
references/cloud-api-operations/references/calling-methods.md:132-149
Vulnerability Type: Persistent cloud IAM privilege expansion
Risk Level: HighVulnerable Instruction Segment
text cam/ListPolicies → cam/AttachRolePolicy → cam/ListAttachedRolePoliciesThe same section permits attaching predefined policies to
TCB_QcsRole, including broad write policies such as:text QcloudMonitorFullAccess QcloudSSLFullAccess QcloudCDNFullAccess QcloudDNSPodFullAccess QcloudAuditFullAccessIt also explains that adding a policy expands the role's permission surface and that every caller obtaining temporary credentials for the role inherits the new permissions.
Technical Analysis
When an API call fails with
UnauthorizedOperationorAuthFailure, the documented recovery path allows an agent operating under an account-level identity to callcam/AttachRolePolicydirectly instead of requiring the user to approve the persistent IAM change through the authorization page.This converts a failure of one requested operation into a durable permission change on a shared service role. The attached policy is not scoped to the current request or session. Any future process that assumes
TCB_QcsRolereceives the newly attached permissions.The file recommends read-only policies where possible, but this is advisory rather than an enforced confirmation boundary. It also lists broad
FullAccesspolicies as valid choices. The directly routedreferences/cloud-api-operations/SKILL.mddoes not require loading the Change Safety Protocol before following this recovery procedure. Althoughreferences/cloudbase-platform/references/protocols/change-safety-protocol.mdseparately requires explicit confirmation for access-control changes, that requirement is not incorporated into this direct execution path.There is no evidence that this behavior was included with malicious intent. It is therefore classified ...[truncated 1782 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user confirmation immediately before every
cam/AttachRolePolicyinvocation. - Present the following information before requesting confirmation:
- Exact target role.
- Exact policy name.
- Whether the policy is read-only or permits writes.
- Principal cloud actions and products covered.
- The fact that the attachment persists after the current session.
- The fact that all future callers assuming the role inherit the permission.
- Default to a task-specific custom policy containing only the required actions and resources.
- Prefer read-only predefined policies where the requested task does not require mutation.
- Never automatically attach a
FullAccesspolicy as an authorization-error recovery step. - Require the agent to load and follow
references/cloudbase-platform/references/protocols/change-safety-protocol.mdbefore any CAM policy attachment. - Add a post-operation cleanup option that detaches temporary task-specific authorization after verification, while requiring confirmation before removal if other workloads may depend on it.
- Record the role, policy, confirmation, attachment result, and cleanup status in an audit trail without recording credentials.
- Prefer directing the user to the interactive CAM authorization page when persistent permission expansion is necessary, rather than silently applying the change through the current account identity.
- Require explicit user confirmation immediately before every
