Back to skill

Security audit

kwaishop-intelligent-diagnosis-skill_test

Security checks for vulnerabilities and agentic risk

Overview

The skill is advertised as domain testing but actually uses a local username file to query an internal merchant CRM and returns the raw response.

Review before installing. This skill may use the operator's local OpenClaw username to query a Kuaishou internal merchant CRM and return raw seller lookup results. Install only if that is the intended function, users are authorized for those merchant queries, and the returned data is acceptable to expose without additional filtering.

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:19
Finding

Undeclared Local Identity Access and Internal CRM Query

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 19-65
Vulnerability Type: Undeclared access to a local identity file and internal business API
Risk Level: Medium

Evidence

text
## Step 1:解析商家名称并获取商家ID

baseUrl: https://merchant-lego.corp.kuaishou.com

接口:
POST https://merchant-lego.corp.kuaishou.com/gateway/crm/seller/manager/querySellerSearchResult
text
- `${username}` 从本地凭证中获取(读取 `~/.openclaw/username` 配置文件里的用户名),若未配置则直接终止下面的执行步骤,直接输出“抱歉,userName认证报错!”
text
## 结果处理
- 直接把http接口返回的结果返回给用户

Technical Analysis

The Skill is presented as a domain-testing utility, but its documented operation instead reads an identity value from ~/.openclaw/username and submits it with a user-supplied merchant name to an internal merchant CRM endpoint. Access to a file outside the project and use of an internal business API are not disclosed by the Skill name or description and are not necessary for the advertised domain-testing purpose.

The instructions do not require explicit consent before accessing the local identity, verify that the requesting user is authorized to query the specified merchant, constrain the merchant name to an authorized scope, or minimize and redact the returned data. The direction to return the raw HTTP result may expose merchant identifiers, response metadata, or other internal information included by the service.

This finding does not establish an authentication bypass or acquisition of privileges beyond those already associated with the local identity. The security issue is the undeclared use of those existing privileges for a task whose advertised purpose does not justify that access.

Attack Path

  1. A user invokes the Skill under its advertised domain-testing purpose and supplies a merchant name.
  2. The agent parses the merchant name without a documented authorization or scope check.
  3. The agent reads the local identity from `~/.openclaw/use ...[truncated 891 chars]
Remediation
View remediation

Remediation Suggestions

  1. Rename and describe the Skill as an internal merchant-ID lookup utility so its actual purpose and required access are explicit.
  2. Require informed user confirmation before reading ~/.openclaw/username or contacting the internal CRM service.
  3. Verify that the requesting user is authorized to query the specified merchant and enforce merchant-level access controls on the server.
  4. Validate and normalize the merchant-name input, including reasonable length and character restrictions.
  5. Avoid directly reading identity material where possible. Use an approved credential or identity provider with narrowly scoped, short-lived authorization.
  6. Return only the merchant identifiers required by the task. Do not expose raw headers, internal diagnostics, or unrelated response fields.
  7. Redact sensitive data from errors and responses, and document the data transmitted to the service.
  8. Add audit logging for identity access and CRM queries without recording credentials or unnecessary personal data.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (4)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documented workflow instructs the agent to read a local credential-related file (~/.openclaw/username) and use that value to query an internal corporate CRM API, even though the stated skill purpose is unrelated. This creates an unjustified bridge between local sensitive context and internal systems, which can expose enterprise identity information and enable unauthorized internal data access under a misleading pretext.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is presented as a 'domain test' tool, but its actual behavior is to look up merchant identifiers through an internal CRM endpoint. This mismatch is dangerous because it obscures the true data access and can mislead users and reviewers into authorizing or invoking a capability they did not intend, enabling covert internal data retrieval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly directs reading a local credential/config file and transmitting the username to an internal endpoint without any meaningful user notice or consent flow. Even if the value is 'only' a username, silently extracting local identity data and forwarding it to a backend violates least surprise and can facilitate tracking, correlation, or broader account enumeration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The display name, description, trigger examples, and procedural instructions are all presented in Chinese, with no indication that users can choose another language or that the locale restriction is intentional and justified. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.