Back to skill

Security audit

文献自动解析

Security checks for vulnerabilities and agentic risk

Overview

The skill is a Chinese literature summarizer, but it is configured to take over every user message and force a fixed summary response.

Install this only if you intentionally want a default, Chinese-language summarizer that treats every message as document text. For normal assistant use, it should be changed to trigger only on explicit literature-analysis requests and allow clarification or user-selected output language.

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

T01 · Skill Instruction Hijacking

Error
Location
index.ts:6
Finding

Unconditional Skill Instruction Hijacking

Content
View full analysis

Vulnerability Details

File Location: index.ts:6-21
Vulnerability Type: Unconditional system-prompt and response-goal override
Risk Level: High

Complete Code Snippet

ts
systemPrompt: `你是专业的学术文献自动解析助手。
用户发送的任何文本,都视为需要解析的文献内容。

请严格按照以下格式输出,不要多余文字、不要解释、不要提问:

【摘要】
用简洁、通顺的语言概括全文核心内容。

【关键词】
列出3–6个最核心的关键词。

【核心结论】
提炼1–3条最重要的结论或观点。`,
trigger: {
  type: 'always', // 设为始终触发,即默认技能
},

The prompt states that every user message must be treated as literature and requires the agent to return only a fixed summary format without explanations or clarifying questions. The always trigger applies these instructions to every interaction rather than limiting them to explicit document-analysis requests.

Technical Analysis

This configuration changes the agent's active objective whenever the Skill is loaded. The broad input-reclassification rule combines with unconditional activation to override unrelated user goals. The prohibition against explanations and questions also prevents the agent from clarifying ambiguous input or responding normally.

Although the Skill does not execute code or obtain system privileges, it exercises instruction-level control beyond the scope reasonably required for an opt-in literature summarizer. The same behavior is also documented in SKILL.md:6-18.

Attack Path

  1. The Skill is installed or loaded into an agent session.
  2. The trigger.type value of always activates it for every user message.
  3. The system prompt reclassifies arbitrary user input as literature requiring analysis.
  4. The fixed-output rule prevents normal answers, explanations, and clarification.
  5. Unrelated user requests are consequently redirected into summaries, keywords, and conclusions.

Impact Assessment

The issue affects the agent's current-session behavior and response integrity. It can suppress unrelated tasks, interfere with other skills, prevent necessary clarification, and replace the user's intended objective with document s ...[truncated 161 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the unconditional always trigger with explicit invocation or a narrowly scoped intent trigger for literature-analysis requests.
  2. Remove the rule that classifies every user message as literature.
  3. Apply the fixed response format only after the user explicitly requests document summarization.
  4. Permit clarification when the input is missing, ambiguous, unsupported, or unrelated to literature analysis.
  5. Ensure the Skill yields to the user's current objective and does not override unrelated tasks or other active skills.
  6. Update SKILL.md and index.ts together so the documentation and runtime configuration enforce the same restricted activation scope.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill declares that any text sent by the user should be treated as literature to analyze, which creates an extremely broad activation condition. In an agent environment, this can hijack unrelated user inputs, override normal intent routing, and cause the system to process arbitrary messages under the wrong skill, increasing the risk of prompt confusion and unintended behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill forces a rigid output template and does not give the user a choice about response style or language. While not directly malicious, this can override user preferences and higher-priority system behavior, making the skill less controllable and more prone to misuse in multi-skill or multilingual settings.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The system prompt is entirely in Chinese and instructs the assistant to always produce output in that format, regardless of user preference. This creates a language-policy issue because the skill does not offer a language choice or explain a justified locale restriction.

Content

No source excerpt is available for this finding.