Back to skill

Security audit

Alicloud Database RDS Custom

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a cloud-query helper, but it asks users to set up powerful Alibaba Cloud credentials and includes sensitive access queries without enough scoping or warnings.

Review this skill before installing. Use it only with a least-privilege Alibaba Cloud RAM user limited to the specific read-only RDS Custom APIs you need, avoid running the curl-to-bash installer without independent verification, and treat any KubeConfig, VNC URL, private IP, VPC ID, or AccessKey material as sensitive.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:116
Finding

Unverified Remote Installer Is Downloaded and Executed by Bash

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 116–121
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

Vulnerable Code

bash
# One-click installation
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"

Technical Analysis

The documented installation command retrieves a mutable shell script from an external URL and immediately executes its contents with Bash. It does not pin a release, verify a cryptographic signature or checksum, or provide an opportunity to inspect the downloaded script before execution.

Although HTTPS protects the connection under normal conditions, it does not establish that the remotely hosted script is immutable or independently verify its contents. Compromise of the hosting infrastructure, publication pipeline, domain, or trusted TLS path could therefore turn this installation step into arbitrary code execution. The payload can also change after the skill package has been audited.

Attack Path

  1. An attacker compromises or gains control over the remote installer, its publication infrastructure, or a trusted delivery path.
  2. The attacker modifies install.sh to include malicious shell commands.
  3. A user or agent follows the prerequisite instructions in SKILL.md.
  4. curl downloads the modified content into command substitution.
  5. /bin/bash -c executes the content immediately with the privileges of the invoking user.
  6. The payload can access files, environment variables, and cloud CLI credentials available to that account, and may perform further actions allowed by the account.

Impact Assessment

Successful exploitation provides arbitrary command execution with the invoking user's privileges. Potential consequences include theft or modification of Alibaba Cloud credentials, unauthorized cloud API operations within those credentials' permissions, alteration of local files, installation of persistence mechanisms, and execution of addition ...[truncated 272 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the direct curl | bash-equivalent installation workflow.
  2. Pin the Alibaba Cloud CLI to a specific reviewed version rather than retrieving a mutable installer.
  3. Download the release artifact as a separate step from a documented official release location.
  4. Verify the artifact using a vendor-published cryptographic signature. If signatures are unavailable, verify a SHA-256 checksum obtained through an independently authenticated channel.
  5. Abort installation if verification fails.
  6. Extract or execute the verified artifact only after validation, using the minimum privileges required.
  7. Document package-manager installation as an alternative where the package repository supplies signature verification and version pinning.
  8. Periodically review and deliberately update the pinned version and expected signature or checksum.

A hardened workflow should follow this sequence:

bash
# Illustrative workflow; replace placeholders with vendor-published values.
VERSION="<PINNED_VERSION>"
EXPECTED_SHA256="<VENDOR_PUBLISHED_SHA256>"

curl --fail --show-error --location \
  --output "aliyun-cli-${VERSION}.tar.gz" \
  "<OFFICIAL_VERSIONED_RELEASE_URL>"

printf '%s  %s\n' "$EXPECTED_SHA256" "aliyun-cli-${VERSION}.tar.gz" \
  | sha256sum --check --strict

# Continue installation only if verification succeeds.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill explicitly includes capability to retrieve ACK cluster KubeConfig and VNC login URLs, which are high-value access artifacts. In the context of an agent skill, exposing instructions for acquiring such credentials materially increases the risk of privileged environment access if the skill is triggered too broadly or used by an unauthorized operator.

Content

Scanner excerpt · SKILL.md (reported line 25)May include surrounding context.

md
| `DescribeRCDisks` | 查询磁盘列表 | ✅ |
| `DescribeRCSnapshots` | 查询快照列表 | ✅ |
| `DescribeRCMetricList` | 查询监控指标(CPU、内存等) | ✅ |
| `DescribeRCClusterConfig` | 查询 ACK 集群 KubeConfig | ✅ |
| `DescribeRCNodePool` | 查询边缘节点池配置 | ✅ |
| `DescribeRCInstanceVncUrl` | 查询 VNC 登录地址 | ✅ |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger description is overly broad, including generic requests about RC instances, RDS custom instances, or even cloud resources. In an agent environment, ambiguous triggering can cause the skill to activate outside its intended scope and retrieve sensitive cloud inventory data without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill metadata says it is for querying custom RDS instances, but the body expands into access to broader infrastructure resources such as ACK cluster KubeConfig and VNC login URLs. That scope expansion can cause an agent or user to invoke the skill for more sensitive data than expected, increasing the chance of over-collection and exposure of operational access material.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation advertises retrieval of private IPs, VNC login URLs, and KubeConfig without explicit sensitivity warnings or usage constraints. These data types can materially aid lateral movement, cluster access, or direct administrative access if exposed to unintended users or downstream systems.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 536)May include surrounding context.

md
- [阿里云 CLI 文档](https://help.aliyun.com/product/29987.html)
- [RDS API 文档](https://help.aliyun.com/document_detail/26223.html)
- [OpenAPI 门户](https://api.aliyun.com/api?product=Rds&api=DescribeRCInstances)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Comments and runtime output are written in Chinese throughout the script, forcing a specific language for users. Under the stated policy, locale-specific language is a violation unless the skill offers user opt-in or clearly documents that it is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The section on unsupported commands explicitly says DescribeRCCloudAssistantStatus, DescribeRCNetworkInterfaces, and DescribeRCInstanceHistoryEvents are not supported in aliyun CLI v3.2.13. Later, the common command reference lists these same commands as normal usable commands, which directly contradicts the earlier guidance and can mislead users about the skill's actual capabilities.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

L134 要求配置“语言(zh)”,属于明确的语言/地区偏好设定,但文档没有说明这是可选项,也未给出用户可自行选择其他语言的方式。根据语言/locale 政策,强制特定语言而无用户 opt-in 属于自然语言层面的策略问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents all user-facing instructional content in Chinese and does not indicate that the skill or documentation is region-specific or that another language is available. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code prints private IP addresses and VPC identifiers for RC instances, which are sensitive infrastructure details. Although the script echoes results, it does not include any warning in comments or user-facing output that sensitive network metadata will be displayed.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.