T05 · Unauthorized Access and Privilege Escalation
- 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: MediumVulnerable 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
43and88. 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
- An unauthenticated user asks the Agent to query an arbitrary numeric order identifier.
...[truncated 1082 chars]
- Remediation
View remediation
Remediation Suggestions
- Require authenticated access to the order-query endpoint, even when it is invoked through an Agent Skill.
- Enforce server-side object-level authorization by verifying that the authenticated principal owns the requested order or has an explicitly assigned support role.
- Do not rely on possession of an order number as proof of authorization.
- Replace predictable public order references with cryptographically random, non-enumerable identifiers where operationally feasible.
- Apply per-user and per-source rate limits, request throttling, and automated detection for sequential identifier scans.
- Record access attempts and alert on high-volume requests, repeated failures, or queries spanning many unrelated orders.
- Return uniform error responses for nonexistent and unauthorized orders to reduce identifier discovery.
- Avoid exposing raw backend error messages to users; map them to controlled, non-sensitive messages.
- Disable the unauthenticated test mode before production use, or isolate the test endpoint from public and production networks.
- Update the Skill instructions so they require an authenticated, authorized API tool rather than directly querying a public endpoint.
