Back to skill

Security audit

Shulan MCP

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated ShuLan data-research purpose, but it can send user research content and an API key to a configurable service and create billable or subscription tasks without a clear confirmation safeguard.

Review before installing. Use only a trusted HTTPS ShuLan endpoint, keep the API key out of shared or committed config files, and require your agent to ask for explicit approval before any `shulan_create_task` call, especially subscription tasks or requests with sensitive business/customer data.

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

Warning
Location
mcp-server/server.js:14
Finding

Configurable API Endpoint Can Receive Credentials and Sensitive Research Data

Content
View full analysis

Vulnerability Details

File Location: mcp-server/server.js, lines 14–20
Vulnerability Type: Unrestricted credential-bearing outbound requests
Risk Level: Medium

Vulnerable Code

js
const BASE = process.env.SHULAN_BASE_URL || "http://127.0.0.1:8790";
const KEY = process.env.SHULAN_API_KEY || "";

async function call(path, options = {}) {
  const headers = { "Content-Type": "application/json" };
  if (KEY) headers.Authorization = `Bearer ${KEY}`;
  const res = await fetch(`${BASE}${path}`, { ...options, headers });

Technical Analysis

The server accepts SHULAN_BASE_URL without validating its scheme, hostname, port, or origin. It then attaches SHULAN_API_KEY as a Bearer token to every API request sent to that endpoint.

This configurability supports local or self-hosted deployments, but it does not enforce a trust boundary. A malicious or mistakenly configured base URL can point to an attacker-controlled server. The implementation also permits plaintext HTTP for non-loopback destinations, allowing credentials and request contents to be exposed through network interception.

Task-creation calls can include the user's research question, requested data sources, task type, cost estimate, and subscription frequency. Consequently, this weakness can expose both authentication credentials and potentially sensitive business-research information.

Attack Path

  1. An attacker persuades the user, modifies deployment configuration, or supplies setup instructions that set SHULAN_BASE_URL to an attacker-controlled HTTP or HTTPS endpoint.
  2. The MCP server reads this endpoint without validation.
  3. The user or agent invokes any ShuLan tool.
  4. The server sends Authorization: Bearer <SHULAN_API_KEY> to the configured endpoint.
  5. If shulan_create_task is invoked, the request body additionally discloses the research question and task parameters.
  6. The attacker can capture the API key ...[truncated 817 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse SHULAN_BASE_URL with the standard URL class and reject malformed URLs.
  2. Permit only https: for remote hosts. Allow http: solely for explicit loopback addresses such as 127.0.0.1, ::1, and localhost.
  3. Default to an allowlisted production origin such as https://shulan.io.
  4. Require an explicit security override for self-hosted origins and display a warning that the configured server will receive the API key and research content.
  5. Reject URLs containing embedded usernames or passwords, unexpected schemes, or fragments.
  6. Bind credentials to approved origins so the Authorization header is not automatically sent to arbitrary destinations.
  7. Fail closed when SHULAN_API_KEY is absent for authenticated operations rather than silently issuing unauthenticated requests.
  8. Use restricted, revocable API keys with minimum required permissions and spending limits.
  9. Document secure secret injection and recommend restrictive permissions for configuration files such as ~/.claude/mcp.json.
  10. Add automated tests covering attacker-controlled hosts, remote plaintext HTTP, malformed URLs, embedded credentials, and approved local development endpoints.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

MCP Config Access

High
Category
Agent Snooping
Confidence
95% confidence
Finding

Referencing ~/.claude/mcp.json is not inherently unsafe, but the example encourages storing secrets in a well-known local config path used by an MCP client. That can increase exposure if the file is backed up, synced, inspected by other tools, or left with permissive filesystem permissions; the surrounding skill context makes this more relevant because the documented key directly authorizes paid API actions.

Content

Scanner excerpt · docs/mcp.md (reported line 22)May include surrounding context.

Claude Code 配置示例

~/.claude/mcp.json:

json
{

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest explicitly states that creating a task triggers automatic billing, but it does not require a confirmation step, spending cap acknowledgement, or other consent control. That creates a direct risk of unauthorized purchases or recurring charges, especially because the same schema also supports subscription tasks with a frequency parameter.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: fast-uri==3.1.5 — 4 advisory(ies): CVE-2026-75931 (fast-uri vulnerable to host confusion via skipped IDN canonicalization on scheme); CVE-2026-75975 (fast-uri vulnerable to server-side request forgery via malformed IPv6 normalizat); CVE-2026-75899 (fast-uri vulnerable to server-side request forgery via repeated hostname percent) +1 more

High
Category
Supply Chain
Confidence
88% confidence
Finding

The lockfile pins fast-uri 3.1.5, and the cited advisories describe SSRF and URL/host confusion weaknesses in URL parsing and normalization. In an MCP server that brokers external data/tool access, incorrect URL canonicalization can become security-relevant if any code path validates, rewrites, or fetches attacker-influenced URLs using this library transitively.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly positions this project as a wrapper around a third-party REST API and instructs users to provide an API key, but it does not clearly warn that prompts, business queries, and any submitted data may be transmitted to an external service. In an agent-skill context, that omission is security-relevant because users may unknowingly send sensitive commercial, customer, or internal research data to ShuLan through MCP tool calls.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill uses environment-backed credentials and external networked MCP capabilities, but it does not declare any explicit tool scope or allowed-tools constraints. This increases the chance of over-broad tool access or unintended invocation paths, making external calls with sensitive context less auditable and harder to restrict.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation text is broad enough to match many generic business-research or reporting requests, which can cause the skill to trigger in situations the user did not specifically intend. In practice, that can route user prompts into an external data workflow, potentially causing unnecessary data disclosure or billable task creation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow instructs creation of a ShuLan task from the user's research question, but the skill does not clearly warn that user-provided content may be transmitted to an external service. Users may unknowingly send sensitive business plans, customer data, or internal investigative queries to a third party, creating privacy, confidentiality, and compliance risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation instructs users to place a live API key into environment/config values and even shows the key inline in a persisted MCP config example, but it does not warn that this credential is sensitive, should not be committed, and should be stored securely. In MCP/client setups, config files may be readable by other local users, synced to cloud settings, or accidentally checked into source control, increasing the chance of credential leakage and unauthorized API use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The tool list states that shulan_create_task automatically incurs charges, but the warning is brief and not paired with usage safeguards, confirmation expectations, or cost-estimation guidance. In agentic/MCP contexts, a user may authorize a skill once and then trigger billable operations unintentionally or repeatedly, creating financial abuse or surprise charges.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Several tool descriptions and enum labels are only in Chinese, while the manifest does not indicate that the skill is China-specific or that users can choose language. This creates a natural-language policy concern because it effectively forces one language for understanding tool behavior and parameters without opt-in or justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The paid task-creation tool is described only as creating a research task and returning an ID, while the billing consequence is easy to miss and there is no explicit indication of required consent or safe activation boundaries. In an agent setting, underspecified descriptions increase the risk that the model invokes a charge-incurring action when the user was only asking for information or planning help.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The helper sends requests to the configured backend and includes the user's task payload plus an Authorization bearer token when present. Although the file comments document the environment variables, there is no user-facing disclosure, prompt, or runtime notice that user-provided questions and credentials will be sent over HTTP to an external/local service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The natural-language description and operational guidance are entirely in Chinese, with no indication that users may interact in other languages or that Chinese is a required locale. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy concern unless the locale restriction is explicit and justified.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: hono==4.13.3 — 3 advisory(ies): CVE-2026-84363 (Hono: Query parser reads parameters after the URL fragment, causing cache-key an); CVE-2026-84364 (Hono: Unbounded dot-notation nesting in `parseBody()` can cause memory exhaustio); CVE-2026-84365 (Hono: Incomplete fix for CVE-2026-39408: `toSSG()` still writes files outside th)

Low
Category
Supply Chain
Confidence
79% confidence
Finding

The lockfile includes hono 4.13.3, which is reported to have issues in query parsing, body parsing resource consumption, and path handling in specific features. The dependency is present via the MCP SDK, so while exploitability depends on whether the server exposes HTTP endpoints using the affected functionality, parser and filesystem bugs in a network-facing framework should be treated as real until ruled out.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: qs==6.15.3 — 2 advisory(ies): CVE-2026-82417 (qs: Denial of Service via Attacker Controlled isBuffer); CVE-2026-82562 (qs array-limit bypass via bracket-key comma parsing)

Low
Category
Supply Chain
Confidence
74% confidence
Finding

The lockfile contains qs 6.15.3, and the cited advisories indicate request-parameter parsing edge cases that can lead to denial of service or limit bypasses. Because qs is used by Express/body parsing components in the dependency tree, this is a genuine supply-chain risk for any deployment that accepts attacker-controlled query strings or form bodies.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language description is written entirely in Chinese and does not indicate that other languages are supported or that the package is intended only for a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · mcp-server/package.json (reported line 37)May include surrounding context.

json
"prepublishOnly": "npm pack --dry-run"
  },
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.12.0",
    "zod": "^3.24.1"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · mcp-server/package.json (reported line 38)May include surrounding context.

json
},
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.12.0",
    "zod": "^3.24.1"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The visible natural-language documentation in this file is entirely in Chinese and does not provide an alternative language or indicate that the skill is region- or locale-specific. Under the language/locale policy, forcing a specific language without user opt-in can be a policy concern.

Content

No source excerpt is available for this finding.