Back to skill

Security audit

Pharmaceuticals Exploration Zhcn

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent PatSnap pharmaceutical research helper, but its setup tells users to put a real API key directly in an MCP URL, which can expose the credential.

Review the credential setup before installing. Prefer a header, secret store, environment-variable mechanism, or redacted MCP credential field if PatSnap supports one; if URL-based keys are unavoidable, treat the MCP config and shell history as sensitive and rotate any key already used this way.

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
SKILL.md:34
Finding

API Credential Exposed Through MCP Connection URL

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 34–36 and 73–75
Vulnerability Type: API credential exposure through a URL query parameter
Risk Level: Medium

Vulnerable Code

Lines 34–36:

bash
claude mcp add --transport http pharma_intelligence \
  "https://connect.patsnap.com/096456/logic-mcp?apiKey=sk-xxxxxxxxxxxx"

Lines 73–75 repeat the unsafe configuration pattern:

bash
claude mcp add --transport http pharma_intelligence \
  "https://connect.patsnap.com/096456/logic-mcp?apiKey=YOUR_API_KEY"

Technical Analysis

The Skill instructs users to place a PatSnap API key directly in the MCP endpoint's query string. Authentication is necessary for the declared pharmaceutical research functionality, but putting credentials in URLs is an insecure secret-handling practice.

The command and complete credential-bearing URL may be retained or exposed through:

  • Shell history
  • MCP client configuration files
  • Process inspection or diagnostic output
  • Proxy and server access logs
  • Application telemetry and error reports
  • Support bundles, screenshots, or copied configuration
  • URL logging by intermediary infrastructure

HTTPS protects the URL while it is transmitted over the network, but it does not prevent disclosure through local command history, client configuration, endpoint logging, or operational telemetry.

The example key is a placeholder rather than a confirmed live secret. The vulnerability is the documented configuration pattern, which directs users to substitute a real credential into the URL.

Attack Path

  1. A user follows the setup instructions and replaces the placeholder with a valid PatSnap API key.
  2. The user runs the command, causing the complete credential-bearing URL to be stored in shell history or MCP configuration.
  3. The URL may additionally appear in process diagnostics, logs, telemetry, or support artifacts.
  4. An attacker with access to one of these sources extracts the apiKey query parame ...[truncated 972 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place API keys in URL query parameters.
  2. Use an MCP client credential field, authorization header, or protected secret store if supported by the service.
  3. Prefer an environment-variable reference rather than placing the literal secret in the command, for example:
bash
export PATSNAP_API_KEY='...'

The MCP configuration should resolve that variable through a protected credential mechanism without serializing the resulting key into a logged URL.

  1. Store credentials in a file or secret manager with access restricted to the current user when environment-variable or header-based authentication is unavailable.
  2. Ensure MCP configuration files containing credentials have restrictive filesystem permissions.
  3. Redact query strings and authentication values from client, proxy, server, telemetry, and diagnostic logs.
  4. Avoid printing credential-bearing endpoints in error messages or connection-status output.
  5. Document immediate key revocation and rotation procedures for users who have already followed the unsafe setup pattern.
  6. Apply server-side least privilege, key expiration, usage limits, and anomaly monitoring to reduce the impact of a leaked key.
  7. If the service only accepts query-string authentication, clearly disclose the residual risk and ensure the client stores and displays the endpoint in redacted form.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill is explicitly labeled 'zhcn' and the description/instructions are written entirely in Simplified Chinese, indicating a fixed locale. There is no statement offering users a language choice or opt-in, which can violate language/locale policy requirements for skills intended for broader use.

Content

No source excerpt is available for this finding.