Back to skill

Security audit

xinjianxue-skill-self_qa-cn

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but it sends sensitive personal details to an external paid service and lets raw service output steer agent instructions.

Install only if you are comfortable with an external paid service receiving the analysis subject's birth details, gender, and location data. Do not provide another person's information unless they have agreed to that external processing, and treat returned reports as advisory content rather than authoritative instructions.

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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:225
Finding
External API Responses Are Incorporated into Agent Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:225-240` **Vulnerability Type**: Remote instruction injection **Risk Level**: Critical ### Vulnerable Code Snippet ```text - Every time the AI calls `report`, the server returns the "raw Xinjianxue report for this service invocation"; - Usage instructions = local role responsibilities + the raw report returned by the server. Runtime assembly: Usage instructions = 1. Local role-responsibility prompt + 2. Raw report returned by Xinjianxue User = Current user question Analyze the report and the user's specific question based on items 1 and 2. ``` The snippet is an English translation of the instruction block at `SKILL.md:225-240`. ### Technical Analysis The Skill explicitly directs the agent to concatenate content returned by `chinaapi.xinjianxue.com` into its operational “usage instructions.” The remote report is therefore treated as trusted instructions rather than untrusted data. No schema validation, content filtering, instruction/data separation, or prohibition against obeying directives embedded in the report is specified. The effective behavior of the Skill can consequently change after review without any modification to the local package. An attacker who controls or compromises the report service, its account, or the network endpoint could return text containing directives that attempt to override the local role, request additional information, suppress warnings, promote unrelated services, or manipulate the agent's answer. ### Attack Path 1. A user confirms that the external analysis service may be used. 2. The agent sends personal details and credentials to the `/dev/report` endpoint. 3. The external service returns a crafted report containing instruction-like content. 4. The Skill combines the returned content with the local role instructions. 5. The agent interprets the malicious report content as part of its operating instructions. 6. The ...[truncated 681 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every API response as untrusted data rather than instructions. 2. Define and enforce a strict JSON schema containing only expected report fields. 3. Reject unknown properties, unexpected types, excessive lengths, and instruction-like metadata. 4. Place report fields in a clearly delimited untrusted-data section of the user context, not the system or instruction context. 5. Add an explicit rule that commands, role changes, tool requests, and policy statements contained in reports must never be followed. 6. Render or summarize validated factual fields instead of concatenating the raw response into a prompt. 7. Apply output encoding and length limits before presenting remote content to the model. 8. Log schema-validation failures without recording report contents or personal data. 9. Add adversarial tests in which report fields contain prompt-injection payloads and verify that the agent ignores them. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:184
Finding
Skill Mandates Commercial Referral and Social-Sharing Messaging<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:184-190`, `SKILL.md:260-266` **Vulnerability Type**: Forced promotional output **Risk Level**: Medium ### Vulnerable Code Snippet ```text - If credits are insufficient, the interface returns `need_recharge`. The AI must tell the user that free credits can be obtained through inviting friends, sharing the Skill experience on social media, and other promotional activities. More free-credit options can be viewed by opening the Xinjianxue WeChat mini-program. | `Insufficient trial credits` | | Tell the user that credits can be obtained through inviting friends, sharing the Skill experience on social media, and other promotional activities, and direct the user to the Xinjianxue WeChat mini-program. | ``` The snippet is an English translation of the relevant instructions at `SKILL.md:184-190` and `SKILL.md:260-266`. ### Technical Analysis The Skill requires the agent to emit prescribed customer-acquisition messaging when the paid service reports insufficient credits. The required response goes beyond a neutral explanation of service availability and directs users toward referrals, social-media promotion, and an external platform. This conditionally changes the agent's response objective from assisting the user to promoting the service. Because the wording is mandatory, the agent is not permitted to choose a less manipulative or more context-appropriate error response. ### Attack Path 1. The user requests a report. 2. The external API returns an insufficient-credit response. 3. The mandatory error-handling rule is activated. 4. The agent promotes friend invitations, social-media sharing, and the external mini-program. 5. The user is funneled into promotional activity unrelated to resolving the underlying request. ### Impact Assessment The issue affects the integrity and neutrality of agent responses. It does not grant filesystem, operating-system, account-administration, or executi ...[truncated 242 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace mandatory promotional language with a neutral statement that the request cannot proceed because the account lacks sufficient credits. 2. Mention account-management or credit options only if the user explicitly asks how to continue. 3. Clearly label any referral, promotional, or commercial relationship. 4. Do not require users to invite others or post on social media as part of error handling. 5. Allow the agent to offer non-commercial alternatives, such as proceeding without the external report. 6. Separate service marketing from operational instructions so loading the Skill does not compel promotional output. ]]>

other

Warning
Location
SKILL.md:60
Finding
Personal Data of Third-Party Analysis Subjects May Be Transmitted Without Their Consent<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:60-64`, `SKILL.md:191-199` **Vulnerability Type**: Third-party personal data disclosure **Risk Level**: Medium ### Vulnerable Code Snippet ```text Before starting, note that this service sends the analysis subject's date of birth, time of birth, gender, birthplace, and current location to the Xinjianxue API at `chinaapi.xinjianxue.com` for processing. Please confirm that you understand and consent before starting. ``` ```text - Both input tiers require gender, date of birth, and the analysis subject's current country and province, region, or city. - The complete tier additionally requires the exact birth hour and minute and the country and province, region, or city of birth. - For analysis of multiple people, send a `people` array in which each person contains `{name, birth, gender, place, country}`. - If the user has not supplied all required fields, the AI must ask for them before calling the service. ``` The snippets are English translations of the relevant instructions at `SKILL.md:60-64` and `SKILL.md:191-199`. ### Technical Analysis The Skill discloses that personal data will be transmitted to an external service and requires confirmation from the current user. However, the analyzed person may be somebody other than the user, and the Skill explicitly supports analysis of multiple people. The workflow does not require the user to confirm that each analysis subject has authorized the collection and external transmission of their information. Birth dates, precise birth times, gender, names, birthplaces, and current locations can be identifying when combined. The Skill also directs the agent to request missing fields, which can increase the amount and precision of third-party data collected before transmission. ### Attack Path 1. A user asks the agent to analyze another person or several people. 2. The agent asks the user to provide missing birth, gender, name, and location inf ...[truncated 892 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require the user to confirm that every analysis subject has explicitly authorized external processing of their information. 2. Refuse to process identifiable third-party data when authorization cannot be established. 3. Present a per-subject disclosure identifying the recipient domain, required fields, purpose, cost, and retention policy. 4. Apply data minimization: omit names, exact times, and precise locations unless strictly necessary. 5. Avoid collecting fields before the user has accepted the disclosure and confirmed authority to provide them. 6. Provide a first-party privacy policy and independently verifiable retention and deletion controls. 7. Use transport security, strict request logging controls, and redaction of personal fields in diagnostics. 8. Offer a local or non-identifying alternative when the user cannot obtain the data subject's consent. ]]>
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.