Back to skill

Security audit

蛋叔订单商品查询

Security checks for vulnerabilities and agentic risk

Overview

This skill only performs an order-product lookup, but it exposes an unauthenticated internal order API using guessable numeric order IDs, which needs review before use.

Review this before installing. It should only be used in a controlled test environment or behind proper authentication and authorization. Require users to identify this specific merchant/order domain, verify they are allowed to access the order, avoid exposing raw backend errors, and add rate limits or non-enumerable order identifiers before production use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:25
Finding

Unauthenticated and Enumerable Order Lookup

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 25–35, 66–70, and 81–83
Vulnerability Type: Missing authentication and object-level authorization
Risk Level: Medium

Vulnerable Code

Lines 25–35:

markdown
**接口地址:** `https://trade.dangaoss.cn/cake_api/ck_orders`

**请求方式:** GET

**请求参数:**
| 参数名 | 类型 | 必填 | 说明 |
|--------|------|------|------|
| order_id | string | 是 | 订单号 |

**示例请求:**

GET https://trade.dangaoss.cn/cake_api/ck_orders?order_id=43

text

Lines 66–70:

markdown
1. **提取订单号**:从用户输入中识别订单号
2. **调用API**:使用 `https://trade.dangaoss.cn/cake_api/ck_orders?order_id={订单号}` 获取数据
3. **解析响应**:判断 code 是否为 200
4. **返回结果**:
   - 成功时,返回商品名称

Lines 81–83:

markdown
- 当前接口无需认证(测试模式)
- 订单号必须是有效数字
- 如返回非200状态码,直接展示 msg 中的错误信息

Technical Analysis

The Skill instructs the Agent to access an order-query API using only a caller-controlled numeric order_id. It explicitly states that authentication is not required. No ownership verification, authorization token, or other object-level access control is documented before the product associated with an order is returned.

Numeric order identifiers are likely predictable, as illustrated by the small example identifiers 43 and 88. An arbitrary caller can therefore submit generated or adjacent identifiers and distinguish valid orders through successful responses. This represents an insecure direct object reference and permits unauthorized access to order-associated business information.

Although the documented response exposes only the cake product name, it still discloses purchase information and confirms the existence of valid orders. Returning the API's raw error messages may additionally help callers distinguish nonexistent identifiers from other failures and optimize enumeration.

Attack Path

  1. An unauthenticated user asks the Agent to query an arbitrary numeric order identifier.

...[truncated 1082 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require authenticated access to the order-query endpoint, even when it is invoked through an Agent Skill.
  2. Enforce server-side object-level authorization by verifying that the authenticated principal owns the requested order or has an explicitly assigned support role.
  3. Do not rely on possession of an order number as proof of authorization.
  4. Replace predictable public order references with cryptographically random, non-enumerable identifiers where operationally feasible.
  5. Apply per-user and per-source rate limits, request throttling, and automated detection for sequential identifier scans.
  6. Record access attempts and alert on high-volume requests, repeated failures, or queries spanning many unrelated orders.
  7. Return uniform error responses for nonexistent and unauthorized orders to reduce identifier discovery.
  8. Avoid exposing raw backend error messages to users; map them to controlled, non-sensitive messages.
  9. Disable the unauthenticated test mode before production use, or isolate the test endpoint from public and production networks.
  10. Update the Skill instructions so they require an authenticated, authorized API tool rather than directly querying a public endpoint.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill declares very broad trigger phrases such as '查订单' and '查蛋糕' that can match ordinary conversation without sufficient narrowing to this specific internal order lookup task. This can cause unintended activation and disclosure of order-related product information to users who did not clearly intend to invoke the internal API-backed skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The usage examples reinforce ambiguous activation phrases without guardrails, increasing the chance that the agent routes generic '订单查询' or '蛋糕订单' requests into this skill even when the user means another system or a different order domain. In this context, the skill queries an internal API with no authentication, so misrouting is more dangerous because it can expose internal order product data too easily.

Content

No source excerpt is available for this finding.