Back to skill

Security audit

DOCX Toolkit

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Word document helper with some dependency and scope cautions, but I found no hidden malicious behavior.

Install only if you need Chinese-language Word document automation. Prefer running it in an isolated workspace and replace the global unpinned npm install with a pinned local dependency before using it on sensitive documents.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:70
Finding

Unpinned Global npm Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 70
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Medium

Complete Code Snippet:

text
使用 JavaScript 生成 .docx 文件,然后进行验证。安装:`npm install -g docx`

The same command is repeated in the dependency list at line 600:

text
- **docx**: `npm install -g docx` (生成新的全新空本文卷必备)

Technical Analysis

The Skill directs the Agent to install the mutable latest release of the docx npm package globally. It does not specify an exact reviewed version, lockfile, integrity hash, trusted registry, or lifecycle-script restriction.

npm installation can execute package lifecycle scripts with the permissions of the Agent's operating-system account. Because the package version is not pinned, the code installed during one execution can differ from the code installed after the Skill was reviewed. The global -g option also expands the installation's effects beyond an isolated project directory.

This is a supply-chain weakness rather than evidence that the named package is currently malicious. Exploitation requires compromise of the selected package release, its dependency tree, the configured npm registry, or the dependency-resolution channel.

Attack Path

  1. An attacker compromises a future docx release, one of its resolved dependencies, or the npm registry/resolution path.
  2. The Agent follows the documented setup instruction and runs npm install -g docx.
  3. npm resolves the current mutable package version rather than a previously reviewed version.
  4. Malicious package or lifecycle code executes with the privileges of the account running npm.
  5. The compromised code can access data and modify files available to that account. Because installation is global, it may also affect later workflows that invoke the installed package.

Impact Assessment

Successful exploitation could provide arbitrary code executi ...[truncated 455 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to an exact reviewed version instead of resolving the latest release, for example through a project-local package.json.
  • Commit a lockfile containing integrity metadata and install with npm ci.
  • Install the package in an isolated project directory rather than globally.
  • Use a configured trusted registry and verify package provenance and integrity.
  • Disable lifecycle scripts with --ignore-scripts when the required package functionality permits it. If scripts are required, review them and document that requirement explicitly.
  • Run installation and document generation in a sandbox or container with minimal filesystem and network permissions.
  • Periodically review the pinned package and transitive dependency tree before upgrading.
  • Replace both occurrences of npm install -g docx, including the repeated instruction at line 600, so the insecure command is not retained elsewhere in the Skill documentation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 430)May include surrounding context.

极为关键:对于新的补充语段请遵循专业的智能圆滑标点(Smart quotes)。 当增加带撇号甚至单双引的新字段时,请用 XML 字符实体,好呈现考究的特殊符号:

xml
<!-- 利用以上字符为文档提供更讲究和贴合字型的专业印刷呈现要求 -->
<w:t>看看这段引用:&#x201C;您好。&#x201D;</w:t>

| 实体标签 | 对应字符 |

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 430)May include surrounding context.

极为关键:对于新的补充语段请遵循专业的智能圆滑标点(Smart quotes)。 当增加带撇号甚至单双引的新字段时,请用 XML 字符实体,好呈现考究的特殊符号:

xml
<!-- 利用以上字符为文档提供更讲究和贴合字型的专业印刷呈现要求 -->
<w:t>看看这段引用:&#x201C;您好。&#x201D;</w:t>

| 实体标签 | 对应字符 |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

该文件的描述与操作说明整体以中文直接规定技能行为,L004 的描述体现出默认面向中文使用者,但未声明可根据用户偏好切换语言,也未提供语言/地区选择。按规则,若技能强制特定语言而无用户 opt-in,属于自然语言政策风险。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L008 写明“当用户提到 Word、.docx 或要求生成报告、备忘录、信件等文档时使用”。其中“生成报告、备忘录、信件等文档”范围很广,许多普通写作请求都会命中,但并未明确限定必须是 .docx/Word 场景,也没有给出负例来排除一般内容创作请求。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says the skill is for creating, reading, editing, or manipulating Word documents (.docx) and explicitly says not to use it for PDF, spreadsheets, or Google Docs. However, the documented behavior includes converting .doc files to .docx and converting .docx to PDF and then images, which are broader document-conversion capabilities outside the stated DOCX-only scope.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

Generating PDFs and rasterized page images via LibreOffice and Poppler is not a direct or necessary capability for creating/editing DOCX files as described in the manifest. This adds a document-rendering/export pipeline that is unjustified by the stated purpose, especially given the manifest's explicit warning not to use the skill for PDF.

Content

No source excerpt is available for this finding.