Back to skill

Security audit

NexDoc MCP

Security checks for vulnerabilities and agentic risk

Overview

This is a real design-service integration, but it should be reviewed because the desktop setup runs an unpinned npm server and the workflow can upload sensitive files to NexDoc.

Prefer the remote OAuth setup where possible. If using the desktop stdio setup, verify or pin the npm package version before running it and keep the API key scoped and rotated. Treat documents, photos, resumes, invoices, contracts, and similar files as being sent to NexDoc infrastructure, and use email notification or publishing only when you intentionally requested it.

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:38
Finding
Unpinned Third-Party Package Is Automatically Retrieved and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 38–52 **Vulnerability Type**: Unpinned dependency execution through `npx` **Risk Level**: Medium The documented stdio MCP configuration instructs clients to retrieve and execute a third-party npm package without specifying an exact version or integrity constraint: ```json { "mcpServers": { "nexdoc": { "command": "npx", "args": ["-y", "@nexdoc/mcp-server"], "env": { "NXD_API_KEY": "nxd_live_..." } } } } ``` ### Technical Analysis Running `npx -y @nexdoc/mcp-server` resolves the package version from the configured npm registry at execution time. Because no exact version is pinned, the code executed by the client can change after the skill has been reviewed. The `-y` option suppresses the normal installation confirmation, further reducing the opportunity for users to inspect the resolved package and version. This creates a supply-chain trust boundary in which compromise of the package, its publisher account, its dependencies, or the configured registry could cause attacker-controlled code to run locally. The package process also receives `NXD_API_KEY` through its environment, making that credential accessible to any code executed within the package process. The audit did not establish that the referenced package is currently malicious. The confirmed issue is the unsafe, unpinned retrieval and automatic execution pattern. ### Attack Path 1. An attacker compromises the npm package publisher, a transitive dependency, or the registry resolution path. 2. The attacker publishes or serves a malicious version under the expected package name. 3. A user follows the documented configuration and starts the MCP client. 4. `npx` resolves the package available at that time and, because `-y` is specified, executes it without an interactive confirmation. 5. The malicious package runs with the operating-system privile ...[truncated 925 chars]
Remediation
## Remediation Suggestions 1. Pin the package to a reviewed, exact version, for example: ```json "args": ["-y", "@nexdoc/mcp-server@1.2.3"] ``` Replace the example version with a version that has been independently verified. 2. Document the expected package publisher, registry, release version, and package provenance so users can verify that resolution has not been redirected. 3. Use a lockfile and integrity hashes where the MCP client installation workflow supports them. Prefer reproducible installation from a reviewed dependency tree over resolving packages dynamically at every launch. 4. Remove `-y` where practical so unexpected installation or version changes require explicit confirmation. 5. Review new package versions and their transitive dependency changes before updating the pinned version. Consider automated dependency scanning, provenance verification, and npm package signature or attestation checks. 6. Run the MCP server with least privilege in a restricted environment. Limit filesystem access, outbound network access, and inherited environment variables to those required for operation. 7. Scope and rotate `NXD_API_KEY`, avoid exposing unrelated credentials to the MCP process, and revoke the key promptly if dependency compromise is suspected.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The activation text is very broad (`use whenever the user asks to design, lay out, make a deck, PDF, page, or card`), which can cause the skill to trigger on many ordinary requests. Over-broad routing increases the chance that user content, files, or sensitive business material are sent to an external design service when the user did not clearly intend that escalation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill metadata declares use of `npx` to obtain and run an MCP server without pinning an exact package version. This creates a supply-chain risk: future package changes, compromise of the npm package, or dependency confusion could silently alter the executed code in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The stdio setup instructs users to run `npx @nexdoc/mcp-server` without a pinned version, which means code is fetched and executed dynamically at runtime. In a security-sensitive tool-integration context, that exposes users to remote code execution via compromised upstream packages or unreviewed package updates.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
https://mcp.nexdoc.design/mcp
```

The client opens a browser for OAuth 2.1. **Never ask the user for an API key** on this path. In ChatGPT / Cowork, if the installer offers Token vs OAuth, choose OAuth.

**stdio MCP (desktop clients with an API key).** Cursor, Claude Desktop, and Claude Code can run the published server as a process:
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.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The skill encourages emailing the account owner when a run finishes, but it does not require a clear user-facing privacy notice before that action. This can lead to unexpected disclosure that a document was created or processed, and may expose project metadata or workflow details to an account email address the current user did not expect.

External Transmission

Medium
Category
Data Exfiltration
Content
**Preferred (any size, especially photos):** upload first, then reference — never base64 a large image into a tool call, and never compress or generate a replacement.

1. `request_file_upload { filename, content_type, size_bytes }`
2. PUT the **original** file bytes to `upload_url` (`curl --data-binary @file -H "Content-Type: …"`). Same Content-Type as step 1. Do not base64.
3. `check_file { file_id }` until `status` is `ready`
4. `create_design` / `update_design` with `file_ids: ["file_…"]` and instructions that name the file (e.g. “use the uploaded headshot in the hero”).
Confidence
93% confidence
Finding
The skill explicitly instructs uploading original file bytes to a remote presigned URL, which is an external data transmission path for potentially sensitive user assets. In the context of resumes, invoices, reports, contracts, decks, and photos, this can expose confidential or regulated information if done without clear consent, minimization, or validation of what is being sent.

Static analysis

No suspicious patterns detected.