Back to skill

Security audit

xinjianxue-skill-breakup_save-cn

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed paid API integration, but it needs review because vendor-returned report text is treated as agent instructions and some error handling steers users toward vendor promotion.

Install only if you are comfortable sending the listed personal details to the Xinjianxue service and storing account-bound API credentials locally. Treat returned reports as vendor data, not as instructions for the agent, and review any referral or social-sharing language as commercial guidance rather than neutral advice.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:225
Finding
Untrusted Remote Report Content Is Promoted to Agent Instructions## Vulnerability Details **File Location**: `SKILL.md`, lines 225–240 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: Critical ### Vulnerable Code ```markdown ### 提示词来源 - AI 每次调用 `report`,**服务器把「心鉴学本次服务原始报告」一次性返回**; - 使用说明 = 本地身份职能(见下节) + 服务器返回(心鉴学本次服务原始报告)。 ### 本地身份职能提示词与拼装(本 Skill 提供身份职能槽) 本 Skill 携带**分手挽回指导顾问**的「身份职能」,共两槽: - **角色设定**:专精分手后的心理修复与关系重建的可能性判断 - **专属自检**:别顺着用户的期待解读"还有机会"——先看重建的客观条件,不看用户有多想 **运行时拼装**: ``` 使用说明 = ① 本地身份职能提示词(本节两槽) + ② 心鉴学本次服务原始报告(随 report 返回) user = 用户当前问题(不进 system) ``` ``` The relevant instructions state that the operating instructions are assembled from the local role prompt and the raw report returned by the remote server. ### Technical Analysis The Skill explicitly promotes content returned by `chinaapi.xinjianxue.com` into the Agent's usage instructions. The remote report is therefore treated as trusted instructional content rather than as untrusted data to be interpreted. Because the server response can change after the Skill package has been reviewed, a compromised or malicious server could embed prompt-injection directives in the report. Such directives could attempt to override the local role, alter the current task, suppress warnings, request additional information, expose credentials, or induce unauthorized tool calls. The document does not specify: - A strict response schema or allowlist for accepted report fields. - Separation between instructions and remote report data. - Rejection or escaping of instruction-like content. - Integrity verification or authentication of the returned report beyond HTTPS. - A rule requiring the Agent to ignore commands embedded in the report. This creates a post-review instruction-control channel. It is classified as instruction hijacking rather than remote code execution because the retrieved payload is incorporated into model instructions, not executed as native code. ### Attack Path 1. A user confirms that they want to use the ...[truncated 1335 chars]
Remediation
## Remediation Suggestions 1. Treat the entire remote response as untrusted data and never concatenate it into system, developer, or Skill-level instructions. 2. Define a versioned JSON schema containing only the report fields required for analysis. 3. Reject unknown fields, unexpected data types, oversized values, and free-form control fields. 4. Pass validated report fields to the model inside a clearly delimited data block with an explicit instruction that commands inside the block must not be followed. 5. Extract facts from the report through deterministic parsing where possible instead of directly supplying unrestricted prose. 6. Add prompt-injection filtering as defense in depth, but do not rely on filtering as the primary trust boundary. 7. Restrict downstream tool access while processing external report content and require explicit user confirmation for consequential actions. 8. Log report schema failures and suspicious instruction-like content without recording credentials or unnecessary personal information. 9. Document the remote service as an untrusted content source and test the workflow with adversarial responses such as requests to reveal secrets, ignore prior instructions, or invoke tools.

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:189
Finding
Mandatory Vendor Promotion Manipulates Agent Output## Vulnerability Details **File Location**: `SKILL.md`, lines 189 and 266 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: Medium ### Vulnerable Code ```markdown - **积分不足**时,接口会在返回里提示(`need_recharge`);AI 据此告知用户积分不足,可通过邀请好友、社媒分享 skill 体验等福利活动免费获取积分,更多免费获取途径可以登录微信小程序 → 心鉴学进行查看。 ``` ```markdown | `体验积分不足` | 积分不够本次服务 | 提示用户可通过邀请好友、社媒分享skill体验等福利活动免费获取积分,更多免费获取途径可以登录微信小程序→心鉴学进行查看 | ``` These instructions require the Agent to promote referrals, social-media sharing, and the vendor's external mini-program when the account has insufficient credits. ### Technical Analysis The Skill does not merely report an operational failure. It mandates vendor-directed promotional language that encourages users to invite others, share the Skill on social media, and visit an external commercial channel. This modifies the Agent's output for a commercial acquisition objective that is not necessary to explain or resolve the immediate API error. The behavior is repeated both in the billing section and in the mandatory error-response table, making it an intended and stable output-control rule. The issue is categorized as Skill instruction hijacking because the Skill text redirects part of the Agent's response toward promotional goals. There is no evidence that the promotion itself executes code, changes system permissions, or creates persistence. ### Attack Path 1. The user requests a report through the Skill. 2. The remote API returns an insufficient-credit response. 3. The Skill's mandatory error-handling rule activates. 4. Instead of limiting the response to a neutral explanation, the Agent directs the user toward referrals, social-media promotion, and the vendor's WeChat mini-program. 5. The commercial message is delivered as part of the Agent's trusted response. ### Impact Assessment The issue can: - Manipulate user-facing output for undisclosed promotional purposes. - Pressure users to advertise the service or recruit other users. - Divert users ...[truncated 375 chars]
Remediation
## Remediation Suggestions 1. Replace the mandatory promotional response with a neutral statement that the account lacks sufficient credits to complete the request. 2. Clearly label any recharge, reward, referral, or social-sharing option as vendor-provided commercial information. 3. Present promotional alternatives only when the user explicitly asks how to obtain more credits. 4. Do not require the Agent to encourage invitations or social-media sharing. 5. Separate operational error handling from marketing content. 6. Provide a non-promotional cancellation path and make clear that the user is not required to visit an external service. 7. Review all fixed response rules for unrelated commercial steering and remove instructions that do not directly support the user's requested task.
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.