Back to skill

Security audit

Mcp Builder

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a normal MCP-building guide, but its evaluation runner can automatically invoke any tool exposed by a connected MCP server without enforcing its stated read-only limits.

Review this before installing if you plan to run its evaluation scripts. Use only isolated test MCP servers or read-only credentials, pin dependencies, avoid unpinned npx execution, and do not point the harness at services where exposed tools can create, modify, send, export, or delete real data.

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

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:1
Finding

Unpinned Dependencies Permit Unreviewed Package Installation and Execution

Content
View full analysis
=0.39.0 mcp>=1.1.0 ``` `SKILL.md:140-141`: ```markdown - Run `npm run build` to verify compilation - Test with MCP Inspector: `npx @modelcontextprotocol/inspector` ``` `reference/evaluation.md:384-392`: ```bash pip install -r scripts/requirements.txt ``` ```bash pip install anthropic mcp ``` ### Technical Analysis The Python dependency manifest specifies only minimum versions. It therefore permits installation of any newer release available at resolution time. The alternative installation command does not specify versions at all. The documented `npx @modelcontextprotocol/inspector` command may download and immediately execute the package version selected by the registry and local `npx` behavior. No exact version, lock file, integrity value, or reviewed local installation is required. Consequently, the code users execute is not necessarily the code that was available during the Skill's audit. This makes installations non-reproducible and unnecessarily expands trust to all future releases of the named packages and their transitive dependencies. ### Attack Path 1. An upstream package, maintainer account, release process, or transitive dependency is compromised. 2. A malicious or otherwise unsafe package version is published with a version satisfying the open-ended constraint. 3. A user follows the documented `pip install` or `npx` command. 4. The package manager resolves and downloads the new, unaudited release. 5. Package installation hooks or the package executable run with the user's current operating-system privileges. 6. The compromised package can access files, environment variables, credentials, and network resources av ...[truncated 535 chars]
Remediation
View remediation
mcp== ``` 2. Generate a fully locked dependency set, including transitive dependencies, using a tool such as `pip-compile`, Poetry, or uv. 3. Require package hashes during installation: ```bash pip install --require-hashes -r requirements.lock ``` 4. Add a package lock file for Node-based tools and install with a reproducible command such as `npm ci`. 5. Install MCP Inspector as a pinned local development dependency and invoke it without permitting an implicit latest-version download: ```bash npm install --save-dev --save-exact @modelcontextprotocol/inspector@ npx --no-install @modelcontextprotocol/inspector ``` 6. Enable dependency scanning and update dependencies through reviewed pull requests rather than resolving arbitrary future versions during normal execution. 7. Run package installation and evaluation in an isolated environment without production credentials or unnecessary filesystem access. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/evaluation.py:105
Finding

Evaluation Harness Does Not Enforce Its Read-Only Tool Policy

Content
View full analysis
list[dict[str, Any]]: """Retrieve available tools from the MCP server.""" response = await self.session.list_tools() return [ { "name": tool.name, "description": tool.description, "input_schem ...[truncated 3430 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose presents the skill as a development guide, but the content also directs users to create evaluations, inspect live MCP servers, and interact with external services and tooling beyond a passive guide. This description-behavior mismatch can mislead users and policy systems about the skill's operational reach, causing them to permit server connections, tool execution, file generation, or external API use they did not intend to authorize.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [⚡ TypeScript Guide](./reference/node_mcp_server.md) - TypeScript patterns and examples

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [⚡ TypeScript Guide](./reference/node_mcp_server.md) - TypeScript patterns and examples

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [⚡ TypeScript Guide](./reference/node_mcp_server.md) - TypeScript patterns and examples

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · reference/evaluation.md (reported line 488)May include surrounding context.

md
optional arguments:
  -h, --help            Show help message
  -t, --transport       Transport type: stdio, sse, or http (default: stdio)
  -m, --model           Claude model to use (default: claude-3-7-sonnet-20250219)
  -o, --output          Output file for report (default: print to stdout)

stdio options:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · reference/mcp_best_practices.md (reported line 158)May include surrounding context.

md
**OAuth 2.1**:
- Use secure OAuth 2.1 with certificates from recognized authorities
- Validate access tokens before processing requests
- Only accept tokens specifically intended for your server

**API Keys**:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs the agent to create MCP servers, write evaluation XML files, and fetch external documentation, but it declares no explicit tool scope such as permissions or allowed-tools. That mismatch can cause an agent runtime to grant broader-than-expected capabilities or leave operators unaware that file-writing and MCP-related actions are expected, increasing the chance of unsafe tool use.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx @modelcontextprotocol/inspector without pinning a version makes execution depend on whatever package version is current at runtime. If the upstream package is compromised or introduces breaking or unsafe behavior, users may execute unreviewed code simply by following the skill guidance.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · reference/evaluation.md (reported line 205)May include surrounding context.

md
After understanding the API and tools, USE the MCP server tools:
- Inspect content using READ-ONLY and NON-DESTRUCTIVE operations ONLY
- Goal: identify specific content (e.g., users, channels, messages, projects, tasks) for creating realistic questions
- Should NOT call any tools that modify state
- Will NOT read the code of the MCP server implementation itself
- Parallelize this step with individual sub-agents pursuing independent explorations
- Ensure each subagent is only performing READ-ONLY, NON-DESTRUCTIVE, and IDEMPOTENT operations

Ssd 3

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The guidance to return 'complete, structured data' and 'all available fields and metadata' promotes over-disclosure by default rather than data minimization. In a server-building guide, this can directly influence implementers to expose sensitive or unnecessary fields from upstream systems, increasing privacy and confidentiality risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · reference/node_mcp_server.md (reported line 601)May include surrounding context.

md
mcp = FastMCP("example_mcp")

# Constants
API_BASE_URL = "https://api.example.com/v1"

# Enums
class ResponseFormat(str, Enum):

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · reference/python_mcp_server.md (reported line 353)May include surrounding context.

md
mcp = FastMCP("example_mcp")

# Constants
API_BASE_URL = "https://api.example.com/v1"

# Enums
class ResponseFormat(str, Enum):

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example tool returns user names, IDs, and email addresses in default human-readable output, which encourages implementers to disclose personal data broadly even when not strictly needed for the task. Because this is exemplar code in a best-practices guide, it can propagate unsafe defaults into real MCP servers.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide includes a ctx.elicit(... input_type="password") example that asks users for an API key, but it does not pair that pattern with any guidance on secure credential handling, scoping, storage avoidance, or safer alternatives. In a skill meant to teach MCP server construction, this normalizes interactive collection of secrets and can lead downstream implementers to build tools that solicit and process credentials unsafely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Prompting a user for an API key without accompanying security warnings or handling guidance is unsafe in instructional material. Readers may adopt the pattern without considering secret redaction, non-persistence, access controls, or safer authentication designs, increasing the likelihood of credential exposure.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This is a true vulnerability because the system prompt mandates that the model echo the inputs provided to each tool and the outputs received from each tool. That creates a direct channel for secrets and sensitive data from MCP tools to be reproduced in the final assistant text and then harvested by logs or reports. In this skill context, the risk is elevated because MCP servers commonly bridge to APIs, internal systems, and authenticated resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a real data-exposure risk. The evaluation harness stores model-generated summaries and feedback to disk, and those fields are explicitly instructed to include tool inputs and outputs; if tools handle secrets, PII, tokens, or proprietary data, the report can persist that sensitive material in plaintext. In the context of an MCP evaluation tool, this is more dangerous because the whole purpose is to exercise external-service tools, which often return confidential data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest frames this skill as guidance for MCP servers that integrate external APIs or services. The file://documents/{name} resource example demonstrates reading arbitrary local files from ./docs, a capability that is not clearly justified by that external-service integration focus and broadens the skill into local filesystem access patterns.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency specifier anthropic>=0.39.0 is unpinned, so installs may resolve to different versions over time, including newly introduced vulnerable or breaking releases. In a security-sensitive skill for building MCP servers, this weakens supply-chain reproducibility and makes it harder to verify whether a safe version is being deployed.

Content

Scanner excerpt · scripts/requirements.txt (reported line 1)May include surrounding context.

text
anthropic>=0.39.0
mcp>=1.1.0

Unverifiable Dependency: anthropic has 4 known advisory(ies) (CVE-2026-34450 (Claude SDK for Python has Insecure Default File Permissions in Local Filesystem ); CVE-2026-34452 (Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox); CVE-2026-34450 (The Claude SDK for Python provides access to the Claude API from Python applicat) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The manifest references anthropic without pinning to a specific version, while known advisories exist for some releases, so the project cannot demonstrate that the installed version is unaffected. This creates unverifiable exposure: even if a safe version is currently used, future installs may silently select a vulnerable one.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency mcp>=1.1.0 is also unpinned, allowing future installs to pick up arbitrary newer versions with security regressions or incompatible behavior. Because this package is directly related to MCP server functionality and exposed tool interfaces, version drift here is more dangerous than a typical library and can affect server-side trust boundaries.

Content

Scanner excerpt · scripts/requirements.txt (reported line 2)May include surrounding context.

text
anthropic>=0.39.0
mcp>=1.1.0

Unverifiable Dependency: mcp has 12 known advisory(ies) (CVE-2025-53366 (MCP Python SDK vulnerability in the FastMCP Server causes validation error, lead); CVE-2025-66416 (Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection); CVE-2026-52870 (MCP Python SDK: Experimental task handlers allow any client to access and cancel) +9 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The mcp package has multiple known advisories, but the requirement is not pinned, making it impossible to verify whether deployments are using an affected release. Given this skill is specifically about creating MCP servers, any vulnerable MCP SDK version could directly impact exposed tools, request handling, or network protections.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.