Back to skill

Security audit

work work

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent Chinese academic formatting toolkit, but one documented Word-generation path automatically launches a shell command using a user-influenced file path, creating a real command-execution risk with crafted filenames.

Review before installing. The skill is not malicious based on the inspected artifacts, but avoid running create_word_with_superscript.js on files with untrusted or unusual filenames, and prefer disabling/removing auto-open or replacing shell exec with a non-shell launcher. Treat --deep-check as sharing reference metadata with Crossref, and manually review any filtered or renumbered references before using the result academically.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create_word_with_superscript.js:334
Finding

OS Command Injection in Automatic Document Opening

Content
View full analysis

Vulnerability Details

File Location: scripts/create_word_with_superscript.js, lines 334-346
Vulnerability Type: OS command injection through an untrusted file path
Risk Level: High

Vulnerable Code

javascript
// Automatically open the document
const { exec } = require('child_process');
const platform = process.platform;

let command;
if (platform === 'win32') {
  command = `start "" "${outputPath}"`;
} else if (platform === 'darwin') {
  command = `open "${outputPath}"`;
} else {
  command = `xdg-open "${outputPath}"`;
}

exec(command, (error) => {

The vulnerable outputPath value is derived from command-line input earlier in the file:

javascript
const inputFile = process.argv[2] || 'your_review.md';
const outputFile = inputFile.replace('.md', '_上标版.docx');
const outputPath = path.resolve(outputFile);

Technical Analysis

The script accepts a user-controlled Markdown path through process.argv[2]. It derives outputPath from that path and interpolates the result into a command string passed to child_process.exec().

exec() runs the command through an operating-system shell. Although the path is enclosed in double quotes, quoting does not safely escape embedded quote characters or shell metacharacters. A maliciously constructed filename can terminate the quoted argument and append an additional shell command.

The issue affects the automatic-open operation on Windows, macOS, and Linux because each platform branch builds a shell command through string interpolation. The generated document does not need to contain malicious document content; the attack is carried by its filesystem path.

Attack Path

  1. An attacker creates a Markdown file whose filename contains shell-significant characters suitable for the victim’s operating system.
  2. The attacker supplies the file to a user or persuades the user to process it with:
    bash
    node scripts/create_word_with_superscript.js <crafted-file-path>
    
  3. The sc ...[truncated 1275 chars]
Remediation
View remediation

Remediation Suggestions

Replace shell-based string execution with an argument-array process API that does not invoke a shell:

javascript
const { spawn } = require('child_process');

let opener;
let args;

if (platform === 'win32') {
  opener = 'explorer.exe';
  args = [outputPath];
} else if (platform === 'darwin') {
  opener = 'open';
  args = [outputPath];
} else {
  opener = 'xdg-open';
  args = [outputPath];
}

const child = spawn(opener, args, {
  shell: false,
  detached: true,
  stdio: 'ignore'
});

child.on('error', () => {
  console.log('Automatic opening failed; open the document manually.');
});

child.unref();

Additional hardening measures:

  1. Make automatic document opening opt-in rather than enabled by default.
  2. Add a --no-auto-open option consistent with the Python checker.
  3. Validate that the generated path refers to the expected .docx output before launching it.
  4. Avoid attempting to secure exec() through manual quoting or character replacement; platform-specific shell parsing makes this error-prone.
  5. Add regression tests using paths containing spaces, quotes, command separators, substitution syntax, and Unicode characters.
  6. Document that input paths are untrusted and must never be inserted into shell command strings.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The description suggests an interactive writing and formatting assistant, but the documented behavior is batch-style local-file auditing that outputs reports and may trigger follow-on actions. This matters because users may provide sensitive unpublished manuscripts under a weaker trust model than they would for a script-based processor with local and external side effects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The markdown states mandatory formatting rules tied to specific Chinese fonts and Chinese typographic conventions, such as SimSun and Chinese heading sizes, without offering an opt-in, alternative locale, or documenting that the skill is intended only for a Chinese-language/regional workflow. This can violate language/locale policy because it imposes a specific locale-dependent output format by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language documentation forces a specific language/locale for all user instructions and descriptions, with no opt-in or explanation that the tool is intended only for a Chinese-speaking or region-specific context. This matches the language/locale policy violation category when no user choice or justified constraint is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README describes filtering references, renumbering citations, and generating documents without warning users that these actions may modify content, overwrite outputs, or alter academic references. In an academic-writing context, silent modification can cause integrity loss, citation errors, or unintended destruction of user work, especially if users assume the tool is read-only.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and documents capabilities that imply local file reads/writes, shell execution, application launching, and likely network access, but it declares no explicit tool scope or permissions. This is dangerous because a host system may grant broader-than-expected access without user-visible consent boundaries, increasing the risk of unintended file modification, external data transfer, or command execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description and purpose state that the skill is for Chinese academic papers and is specifically optimized for Chinese academic standards, but they do not present this as a user-selectable locale or explicitly justify the restriction as a region-specific tool. This creates a natural-language locale policy concern because the skill appears to assume a fixed language/formatting context by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The document states that author formatting should add the Chinese suffix "等" when the author list exceeds a limit, which imposes a specific language/locale convention. The file does not indicate that this behavior is optional, user-selected, or limited to a clearly documented region-specific mode in this checklist.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
84% confidence
Finding

The feature claims it will automatically remove non-core journal references, which is an autonomous content-altering action that can silently delete user material and bias academic output. In an academic-review workflow, this is risky because it may discard valid but non-core or interdisciplinary sources, affecting integrity, reproducibility, and completeness of the literature review.

Content

Scanner excerpt · references/features_checklist.md (reported line 34)May include surrounding context.

md
**Capabilities:**
- ✅ Identify Chinese core journals
- ✅ Automatically remove non-core journal references
- ✅ Support custom journal blacklists/whitelists
- ✅ Check reference format completeness

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The checklist says the Word generation module produces documents compliant with Chinese academic standards and sets Chinese typography defaults such as 宋体 and Chinese size conventions. This is a locale-specific policy choice presented as the default behavior, without offering the user a language/locale choice in this file.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/workflow_guide.md (reported line 18)May include surrounding context.

Process Flow

text
Step 1: Write Review
  Format: Markdown
  Output: your_review.md
    ↓

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/workflow_guide.md (reported line 24)May include surrounding context.

md
↓
Step 2: Run Unified Check
  Command: python scripts/unified_checker.py your_review.md
  Automatically executes:
  ✓ Reference format check
  ✓ Citation accuracy check
  ✓ Typo and grammar check

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The optional reference-filtering step is presented as a normal workflow action without an immediate warning that it may alter the original review file. Because users may treat optional cleanup as low risk, this increases the chance of silent source modification and loss of important references or content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow recommends running scripts that directly modify the source document, but the warning is not attached immediately to the action in every workflow path. A user following the quick or step-by-step flow could execute a destructive command before noticing the later backup note, leading to accidental data loss or unintended document corruption.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring is written entirely in Chinese and frames the skill as operating under Chinese academic conventions, while the CLI usage and all user-facing output also assume Chinese-only interaction. This creates a language/locale constraint without user opt-in or an explicit justification that the tool is limited to a Chinese-language context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script invokes a platform-specific shell command via child_process.exec to automatically open the generated document. Even though the path is quoted, executing a shell is unnecessary for a document-formatting skill and increases risk by enabling command execution behavior tied to user-controlled input and local environment handling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module documentation presents this as a generic 'document format checker' for academic documents, but the code exclusively inspects Markdown-style markers such as '#', '##', '###', list tokens, and plain-text section strings. That materially contradicts the apparent scope of the documentation, especially given the broader skill context around Chinese academic papers and compliant Word documents.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/create_word_with_superscript.js:45