T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:96- Finding
Account-Wide Wildcard Permissions Exceed the Skill's Operational Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:96-125
Vulnerability Type: Excessive cloud IAM permissions
Risk Level: HighVulnerable Code
bash cat > /tmp/cvm-policy.json << 'EOF' { "version": "2.0", "statement": [ { "effect": "allow", "action": ["cvm:*", "vpc:*", "cbs:*"], "resource": "*" } ] } EOF tccli cam CreatePolicy \ --PolicyName "CVM-Manager" \ --PolicyDocument "$(cat /tmp/cvm-policy.json)" \ --Description "CVM server management permissions"bash cat > /tmp/cos-policy.json << 'EOF' { "version": "2.0", "statement": [ { "effect": "allow", "action": ["name/cos:*"], "resource": "*" } ] } EOFTechnical Analysis
The installation instructions grant every CVM, VPC, CBS, and COS action against every resource available to the Tencent Cloud account. These permissions are substantially broader than the operations implemented in
src/tencent_ops.py, which primarily list, create, start, stop, and terminate CVM instances; inspect or create security groups; and perform selected bucket and object operations.Wildcard actions also authorize sensitive operations that are not required by the implementation. Using
"resource": "*"removes resource-level isolation between resources managed by this Skill and unrelated production resources in the same account.This violates least privilege. Although the instructions recommend creating a sub-user, that sub-user remains highly privileged across multiple Tencent Cloud services.
Attack Path
- An operator follows
SKILL.mdand creates the wildcard policies. - The policies are attached to the Skill's Tencent Cloud sub-user.
- The corresponding Secret ID and Secret Key are stored in the local environment or
.envfile. - An attacker obtains those credentials through host compromise, accidental disclosure, malicious dep ...[truncated 1051 chars]
- An operator follows
- Remediation
View remediation
Remediation Suggestions
- Replace service-wide wildcard actions with an explicit allowlist of API actions actually used by the implementation.
- Separate read-only, resource-creation, and destructive operations into distinct policies or roles.
- Restrict permissions by project, region, resource identifier, bucket ARN, resource prefix, and tags wherever Tencent Cloud IAM supports those conditions.
- Require an independently authorized role for destructive operations such as instance termination and bucket deletion.
- Avoid granting CBS permissions unless disk-management functionality is actually implemented.
- Limit VPC permissions to security-group describe and create operations if those are the only required functions.
- Limit COS permissions to the specific buckets and object prefixes managed by the Skill.
- Rotate credentials regularly and use short-lived credentials where possible.
- Document the exact required IAM actions and validate the policy using a dedicated non-production account before deployment.
