Back to skill

Security audit

pharmaceuticals-exploration

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate pharmaceutical research skill, but it needs review because it handles a PatSnap API key unsafely and requires unnecessary authenticated network checks.

Install only if you are comfortable connecting a PatSnap account to the agent and sending relevant drug-research queries to PatSnap, with possible supplemental web searches. Prefer a short-lived, scoped API key, rotate it if exposed, and ask the publisher for a safer setup path that avoids putting secrets in URL query strings and removes the repeated EGFR preflight request.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:34
Finding

API Credential Passed Through a URL Query Parameter

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 34-36
Vulnerability Type: API credential exposure through insecure configuration
Risk Level: Medium

Vulnerable Code

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

The same credential-handling pattern is repeated in the troubleshooting instructions at lines 74-76:

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

Technical Analysis

The documentation instructs users to place a PatSnap API key directly in a URL query parameter. The checked-in values are placeholders rather than active credentials, but users are expected to replace them with real secrets.

HTTPS protects the request while it is in transit, but it does not prevent the credential-bearing URL from being exposed through other channels. Depending on the client and operating environment, the URL may be retained in:

  • Shell history
  • MCP client configuration
  • Process arguments
  • Debugging and diagnostic output
  • HTTP proxy, gateway, or server access logs
  • Terminal recordings and copied support logs

Query strings are commonly logged as complete request targets. Consequently, using them for authentication unnecessarily increases the number of places in which the secret may persist.

Attack Path

  1. A user creates a valid PatSnap API key.
  2. The user substitutes the key into the documented URL and runs the command.
  3. The credential-bearing command or URL is retained in shell history, MCP configuration, process telemetry, or service logs.
  4. A local user, administrator, support operator, monitoring system, or other party with access to those records obtains the URL.
  5. That party extracts the apiKey value and submits authenticated requests to the PatSnap service.
  6. The exposed key rem ...[truncated 660 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place API keys in URL query parameters.
  2. Prefer an authorization header, such as Authorization: Bearer ..., if supported by the MCP service.
  3. Load the key from a protected environment variable, operating-system credential store, or dedicated secret manager.
  4. Ensure the MCP client stores credentials separately from ordinary endpoint configuration and applies restrictive filesystem permissions.
  5. Redact authorization values and sensitive query parameters from client, proxy, gateway, and server logs.
  6. Update the setup example so users are not encouraged to paste secrets directly into commands that may enter shell history.
  7. If query-parameter authentication is unavoidable, use short-lived, narrowly scoped keys; disable command history for setup; document the residual exposure; and rotate the key after suspected disclosure.
  8. Review existing logs and configurations for previously exposed keys and revoke or rotate affected credentials.

other

Note
Location
SKILL.md:58
Finding

Mandatory Unrelated External Connectivity Probe for Every User Query

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 58-62
Vulnerability Type: Excessive mandatory network access
Risk Level: Low

Vulnerable Code

text
**Before processing any user query after this skill loads, the following connectivity check MUST be performed.**

1. Probe MCP connectivity with a lightweight tool call, e.g. query the known target `EGFR`:
   - Use `ls_target_fetch` to look up EGFR by name
   - If valid data is returned → MCP is connected, proceed to the user's query

Technical Analysis

The Skill requires an authenticated request to PatSnap before processing every user query, even when the fixed EGFR lookup is unrelated to the requested subject. Connectivity validation is reasonable during installation, session initialization, or recovery from an actual connection failure. Requiring the same probe for every query exceeds the minimum network activity necessary for the declared pharmaceutical-research functionality.

Each redundant probe exposes request timing and service-usage metadata to the external provider. It also increases API-key use, quota consumption, log volume, and the number of authenticated requests through which configuration or logging failures could expose credentials.

The destination is the declared PatSnap service, and the probe does not transmit user prompt contents according to the audited instructions. Therefore, this is an excessive-access and privacy-minimization issue rather than evidence of covert data exfiltration.

Attack Path

  1. The user configures the PatSnap MCP service with an API key.
  2. The Skill is loaded and receives any user query.
  3. Before processing the query, the agent performs the mandatory fixed EGFR lookup.
  4. PatSnap receives and records an authenticated request, including its timing and associated account or key metadata.
  5. Repeated user interactions produce repeated unnecessary requests.
  6. If request URLs or authent ...[truncated 717 chars]
Remediation
View remediation

Remediation Suggestions

  1. Perform connectivity validation once during installation or session initialization rather than before every query.
  2. Prefer lazy validation: invoke the MCP operation genuinely required by the user's request and show setup guidance only if that operation fails.
  3. Cache successful connectivity status for a bounded session period.
  4. Retry only for transient failures and use bounded retries with backoff.
  5. Avoid fixed test lookups when a dedicated health-check endpoint is available.
  6. Ensure health checks do not consume billable quota and do not expose credentials in URLs or logs.
  7. Clearly disclose when authenticated third-party network access will occur.
  8. Permit requests that do not require PatSnap data to proceed without an unrelated external probe.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description says the skill is used for 'answering drug-related questions' and activates when users mention specific drugs or when other skills call it, but it does not clearly define scope limits or exclusion conditions. This broad phrasing can cause unintended invocation for general conversation about drugs, diseases, or short mentions like a standalone drug name.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest frames the skill as searching and summarizing drug-related patents, literature, database records, clinical trials, and licensing documents, which implies use of the named life-science data services. However, the instructions explicitly authorize broader web search after MCP retrievals, expanding behavior beyond the described data-source scope.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
**When to use**: After completing Condition Search and Vector Search, assess whether the results are sufficient from
three dimensions:

| Dimension             | Description                                                                                |
|-----------------------|--------------------------------------------------------------------------------------------|
| Coverage completeness | Does it cover all key points of the user's query?                                          |
| Data depth            | Is there sufficient detail and data to support the answer?                                 |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Module triggers repeatedly use broad phrases such as 'asks about', 'etc.', and open-ended categories like commercialization progress or clinical mechanisms. These descriptions do not state clear constraints or examples of when a module should not run, increasing the risk of over-activation across loosely related user prompts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill requires an unconditional MCP probe using a hardcoded EGFR lookup before every user query, causing unnecessary third-party requests unrelated to user intent. This creates avoidable data egress and side effects, and could leak usage patterns or trigger repeated external calls even when the user did not request any target-related operation.

Content

No source excerpt is available for this finding.