Back to skill

Security audit

查询微信Unionid关联的京东账号及基础信息

Security checks for vulnerabilities and agentic risk

Overview

This skill openly performs a sensitive identity lookup from a WeChat unionid to JD account data, but it asks for linked identifiers and all account fields without visible authorization, minimization, or masking controls.

Install only in a tightly controlled environment where operators are authorized to perform this exact identity-linkage workflow. Require documented approval, restrict database credentials and fields returned, mask identifiers and sensitive profile attributes, reject bulk enumeration, and audit every lookup before using this skill with real user data.

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

Error
Location
SKILL.md:16
Finding

Unrestricted Correlation and Overexposure of Linked Account Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 16-25
Vulnerability Type: Missing authorization controls and excessive sensitive-data retrieval
Risk Level: High

Vulnerable Skill Instructions

The following is a faithful English translation of the relevant instructions:

text
## Execution Process
Claude, strictly query the data tables and analyze them in the following order. Pay attention to the dependencies and input/output fields of each step.

step1:
Goal: Query the payment PIN and login PIN using a WeChat UnionID.
Operation: Query table {cdm_map_app_icc_connect_relation_da_new_nonsensitive}
with {dst_val (UnionID), sub_type in (10501, 10502)}
and return {src_val (PIN), index_json (sample data)}.
Dependency: None.
Note: 10501 means WeChat payment for marketplace orders; 10502 means WeChat login.

step1:
Goal: Query basic user information using the PIN.
Operation: Query table {app_lb_acct_base_info}
with {pin (JD account)} and return all fields.
Dependency: step1.src_val.

Technical Analysis

The skill directs the agent to correlate a WeChat UnionID with payment and login account identifiers and then retrieve every field from the corresponding account record. It does not require authentication, authorization, purpose validation, user consent, field-level filtering, or masking before performing the lookup.

The instruction to return “all fields” violates data-minimization principles and can disclose substantially more information than is necessary for account association. Labeling the relationship table as “nonsensitive” does not make the resulting identity correlation nonsensitive: combining a UnionID, payment PIN, login PIN, relationship metadata, and a full account record creates sensitive linked identity information.

This skill does not itself establish database privileges. However, when loaded by an agent that already has query access, it directs that access toward unre ...[truncated 1811 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require an authenticated requester identity and perform an explicit authorization check before either query.
  2. Restrict use to documented business purposes and require a case, ticket, or approval identifier for sensitive lookups.
  3. Verify that the requester is authorized for the specific UnionID or account rather than relying solely on broad table access.
  4. Replace “return all fields” with an explicit allowlist containing only the minimum fields required for the approved workflow.
  5. Mask or tokenize UnionIDs, PINs, and other identifiers in agent output, logs, and intermediate results.
  6. Separate access to the relationship table from access to account details and use narrowly scoped, read-only service credentials.
  7. Add row-level and column-level access controls to both tables.
  8. Reject bulk inputs and enforce rate limits to reduce account enumeration risk.
  9. Record requester identity, purpose, queried identifier, approved fields, timestamp, and result status in tamper-resistant audit logs without logging unnecessary sensitive values.
  10. Add a mandatory confirmation step before disclosing linked account information and return a minimal response by default.
  11. Define retention and deletion rules for query results and prevent sensitive records from being stored in conversation memory.
  12. Conduct a privacy and compliance review to determine whether linking these identifiers is permitted and whether user consent or additional approval is required.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This skill is explicitly designed to take a personal WeChat unionid, derive linked payment/login PINs, and return full JD account base information, yet it includes no warning, authorization constraint, data-minimization rule, or privacy justification. In skill context this is more dangerous, not less, because the workflow directly enables cross-identifier account linkage and broad profile retrieval from a single personal identifier, creating significant privacy, insider-abuse, and unauthorized-account-enumeration risk.

Content

No source excerpt is available for this finding.