Back to skill

Security audit

Docx Editing

Security checks for vulnerabilities and agentic risk

Overview

This skill is a DOCX editing helper with disclosed local file and npm setup risks, and no evidence of hidden exfiltration, persistence, or destructive behavior.

Install only if you are comfortable running the Safe-DOCX npm MCP server with access to DOCX files under your home directory and temp folders. Prefer the pinned or vendored install path, review the package/source before use in sensitive environments, and keep edits directed at explicit input 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:52
Finding
Execution of an Externally Retrieved and Unaudited npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:52-73`, `SKILL.md:80-96`, `SKILL.md:111-122`; `CONNECTORS.md:23-31`, `CONNECTORS.md:54-60`, `CONNECTORS.md:76-88` **Vulnerability Type**: Third-party supply-chain exposure through externally retrieved executable code **Risk Level**: Medium ### Vulnerable Code Segments `SKILL.md:52-73`: ```text - **npm registry fetch** — the recommended connector command `npx -y @usejunior/safe-docx` downloads the package from `registry.npmjs.org` on first run. Subsequent runs use the cached copy unless the cache is cleared. - **No postinstall scripts** — the package declares no `postinstall`, `preinstall`, or `install` hooks. Verify with `npm view @usejunior/safe-docx scripts`. - **Provenance** — releases are published with npm provenance (`--provenance`), so you can verify the package was built from the public GitHub repo via GitHub Actions. - **If you need guaranteed offline install** — pin a specific version and vendor it locally. See the next section. ``` `SKILL.md:80-96`: ```bash # Option 1: Pin a specific version globally npm install -g @usejunior/safe-docx@0.9.0 # Then configure your MCP client to invoke it by path: # command: "safe-docx" # args: [] # Option 2: Vendor the package into your project npm pack @usejunior/safe-docx@0.9.0 # Inspect the tarball, then install it from disk: npm install -g ./usejunior-safe-docx-0.9.0.tgz # Option 3: Build from source (most auditable) git clone https://github.com/UseJunior/safe-docx.git cd safe-docx git checkout <release-tag> npm ci npm run build npm link packages/safe-docx ``` `SKILL.md:111-122`: ```json { "mcpServers": { "safe-docx": { "command": "npx", "args": ["-y", "@usejunior/safe-docx@0.9.0"] } } } ``` `CONNECTORS.md:23-31`: ```json { "mcpServers": { "safe-docx": { "command": "npx", "args": ["-y", "@usejunior/safe-docx@0.9.0"] } } } ``` `CONNECTORS.md:76-88`: ```bash git clone https://github.com/UseJu ...[truncated 3956 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove every unpinned invocation and consistently require an exact reviewed version: ```json { "command": "npx", "args": ["-y", "@usejunior/safe-docx@0.9.0"] } ``` 2. For security-sensitive environments, vendor the exact npm tarball after review and execute a local binary rather than allowing `npx` to retrieve code during invocation. 3. Record and verify a cryptographic digest for the reviewed package artifact. Version pinning alone does not establish artifact integrity. 4. Audit the package source, lockfile, generated distribution files, and complete transitive dependency tree corresponding to the installed artifact. 5. Verify npm provenance and ensure that the published artifact corresponds to the reviewed repository commit and release tag. 6. Use a project-local installation with a locked dependency graph instead of a global npm installation where practical. 7. Run the MCP server in a sandbox with: - Network access denied at the operating-system or container level. - Access restricted to explicitly selected input and output directories. - No access to the entire home directory. - A minimal environment without unrelated secrets or credentials. - A non-privileged operating-system account. 8. Replace the broad `~/` filesystem policy with per-document or dedicated workspace authorization. Enforce path validation outside the third-party process where possible. 9. Align or clearly distinguish the Skill metadata version `0.3.0` and package version `0.9.0` so reviewers can unambiguously identify the audited Skill and executable release. 10. Add automated release checks that reject unpinned package references and verify artifact checksums, provenance, absence of installation hooks, runtime network isolation, and expected filesystem restrictions. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Vague Triggers

Medium
Confidence
90% confidence
Finding
The skill description includes broad trigger phrases such as 'change the contract,' 'read this Word file,' and 'mark up the agreement,' which are common everyday requests and may cause the skill to be invoked in situations the user did not explicitly intend. Unintended invocation matters here because the skill can read and modify local `.docx` files, so an overly eager match could expose sensitive documents or perform edits in the wrong workflow.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The skill recommends launching the MCP server with an unpinned package reference (`npx -y @usejunior/safe-docx`), which allows whatever version is current in the npm registry or cache to be executed. That creates a supply-chain risk: a compromised publisher account, malicious new release, dependency compromise, or unexpected breaking update could result in execution of unreviewed code on the host machine.

Static analysis

No suspicious patterns detected.