Back to skill

Security audit

全球专利检索 · PatentMax

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent patent-search skill, but it has an under-documented API-host override that could send the user's PatentMax API key to a non-PatentMax host if misconfigured or influenced.

Install only if you are comfortable sending patent queries, patent numbers, and related technical descriptions to PatentMax/ip930 and using a paid API key. Keep the key in a private environment variable or secret store, do not paste a real key into shared chats or committed config, and avoid setting PATENTMAX_BASE_URL unless you fully trust the destination because the script will attach your bearer token to that host.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (38)

Tainted flow: 'req' from os.environ.get (line 144, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The client builds outbound requests using a base URL taken directly from the PATENTMAX_BASE_URL environment variable and always attaches the Bearer API key before sending. If that environment variable is influenced by an attacker or misconfigured, the tool can exfiltrate the PatentMax API key and user query data to an arbitrary host, which is a real secret-leak and data-exfiltration risk.

Content

Scanner excerpt · scripts/patentmax_client.py (reported line 153)May include surrounding context.

python
req.add_header(key, value)

    try:
        with urllib.request.urlopen(req, timeout=TIMEOUT) as response:
            payload = response.read()
            # 服务端每个响应都回本次实扣和扣完后的余额。记下来,供 _spent/_balance 输出。
            # 拿服务端的真值,而不是在本地累加估价:跨进程累加迟早算岔,

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The installation examples instruct users to place a live API key directly into shell commands and an MCP header snippet, but do not clearly warn against sharing, committing, logging, or screenshotting those credentials. In an agent/tooling context, users often paste configs into chat, repo files, or desktop integrations, so this increases the chance of credential disclosure and downstream account misuse or unauthorized billed API calls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation encourages enabling command execution and use on shell/HTTP-capable agent platforms without warning that the skill will cause outbound requests and may transmit user queries, patent identifiers, and credentials to a third-party service. In agent environments, this can expand the attack surface by normalizing powerful execution permissions and external data transfer without informed consent or scoping.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description is primarily written in Chinese and specifies invocation arguments in Chinese, but it does not offer a language choice or explain that the skill is intentionally limited to Chinese-speaking users. Under the policy, forcing a specific language without user opt-in is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill first forbids switching to public web sources after API/key failure, then later offers that fallback as a user-selectable option. This contradictory guidance creates a policy bypass path during error handling, which is exactly when agents are prone to unsafe improvisation and provenance confusion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a PatentMax patent-search workflow, but later authorizes broader external-source research using browser tools and non-PatentMax sources. This expands data flows, trust boundaries, and result provenance beyond the declared scope, which can mislead users about where their query content is sent and what sources underpin the report.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill reference is written only in Chinese, with no indication that users may choose another language or that the content is intentionally limited to a Chinese-speaking or China-specific audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document’s instructions, examples, and user-facing guidance are all presented in Chinese, and there is no indication that the skill is region-specific or that users can opt into this language. Per the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states that errors and human-readable messages are returned in Chinese, and the CLI help, notes, and diagnostics throughout the file are also hard-coded in Chinese. This imposes a specific language on users without opt-in, which matches the policy category for language or locale constraints.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · INSTALL.md (reported line 7)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · INSTALL.md (reported line 71)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · INSTALL.md (reported line 79)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · INSTALL.md (reported line 94)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · INSTALL.md (reported line 100)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · INSTALL.md (reported line 129)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · README.md (reported line 100)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · README.md (reported line 110)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · SKILL.md (reported line 609)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api-reference.md (reported line 16)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api-reference.md (reported line 60)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api-reference.md (reported line 76)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api-reference.md (reported line 101)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api-reference.md (reported line 111)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/faq.md (reported line 27)May include surrounding context.

md
if _billing["balance_cents"] < 500:
            out["_balance_warning"] = (
                "余额不足 ¥5,继续批量检索会很快耗尽。"
                "请先提醒用户到 https://api.ip930.com/features/api-platform 充值。"
            )
    if _billing["free_quota"]:
        left = max(0, _billing["free_quota"] - (_billing["free_used"] or 0))

Static analysis

No suspicious patterns detected.