Back to skill

Security audit

cn-llm-router

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious because scanners found serious mismatches between advertised features and behavior, plus unexpected network and data-retention risks; the evidence does not establish malicious intent.

Treat the Review verdict seriously before installing. Consider whether you accept prompts being sent to selected model providers, possible model downloads, optional webhook alerts, and local caching risks. The scanner results are partial: six referenced paths could not be resolved, so the evidence is incomplete.

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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (44)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The core text-routing purpose closely matches the implementation, and caching, reporting, concurrency management, and other related features are supporting behavior. However, multimodal understanding is a material advertised capability that the supplied code does not deliver. Selecting a model tagged multimodal does not itself submit image or audio content, and the dedicated image command is only a placeholder. This is a functional description–behavior mismatch, not evidence of malicious behavior. Exact provider coverage and imported module internals cannot be verified from this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Report generation, pricing comparisons, and budget alerts reasonably support the declared cost-tracking functionality. However, maybe_push_wecom adds an external notification capability: when a webhook is supplied, it POSTs the supplied text to that URL. The description does not disclose this outbound reporting integration. The destination is configurable rather than restricted to WeCom. This does not establish automatic or malicious exfiltration; transmission requires calling the function with a nonempty webhook. The absence of routing implementation in this reporting-only chunk is not itself a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Chat completion requests and streaming align with the declared purpose. Embedding support can reasonably serve the declared semantic cache and is not independently flagged. However, the adapter also exposes document reranking, which is neither described nor shown here as a necessary implementation detail of model routing. The configured-provider requests otherwise appear consistent with normal API operation; no unrelated data collection or malicious behavior is evident. Broader advertised features cannot be verified from this adapter alone.

Content

No source excerpt is available for this finding.

The privacy FAQ denies uploading conversations without clearly warning that live model calls transmit their contents to external providers.

High
Category
Output Handling
Confidence
98% confidence
Finding

The FAQ categorically denies uploading conversations and says prompts remain local, which contradicts live inference through external providers. Although it subsequently acknowledges user-initiated API requests, that qualification does not clearly retract the privacy assurance and could lead users to submit confidential content under a mistaken understanding.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, mcp, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

All error output is fixed to Chinese without a user language choice.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The statement explicitly specifies that all errors are in Chinese, rather than merely presenting Chinese examples. No language-selection mechanism or justification for requiring Chinese error output is given.

Content

No source excerpt is available for this finding.

The adapter contract mandates Chinese error messages without language opt-in.

Medium
Category
Output Handling
Confidence
93% confidence
Finding

The module-level contract specifies Chinese AdapterError output for all adapters, reinforced by the error-class documentation at L018. This fixes a user-facing output language without offering a choice or explaining why the restriction is necessary.

Content

No source excerpt is available for this finding.

ERNIE streaming documentation promises token-estimation fallback, but the stream never performs it.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The comment at L109 explicitly promises text-based estimation when streaming usage is absent. However, the generator only accumulates and yields response text, then emits an empty sentinel; it never calls the imported estimator or communicates token usage, contradicting the documented accounting behavior.

Content

No source excerpt is available for this finding.

Missing-dependency guidance is required to be in Chinese without user opt-in.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The docstring explicitly requires Chinese guidance when websocket-client is missing. This is a specific output-language requirement, not simply documentation written in Chinese, and it provides no user language choice.

Content

No source excerpt is available for this finding.

Spark's stream option buffers the entire response instead of providing the promised incremental output.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The skill documentation promises incremental streaming across all 12 providers without waiting for completion. Here, chat() waits for _ws_chat() to finish collecting the response before returning a generator that yields the complete answer as one chunk, so Spark does not provide that behavior.

Content

No source excerpt is available for this finding.

The cache claims zero networking but automatically loads a model that may be downloaded from an external registry.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

When the optional library is installed, fuzzy lookup automatically constructs a named SentenceTransformer model, which can download missing artifacts despite the cache's zero-network claim. This creates an unexpected outbound connection and external-artifact trust dependency; it does not itself demonstrate transmission of prompt contents.

Content

No source excerpt is available for this finding.

Embedding initialization can download a model without disclosing network access or local model storage.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

Merely having sentence-transformers installed can trigger an undisclosed model download and persistent local artifact storage during cache use. This can violate offline or network-egress expectations and expose connection metadata to the model host, although the shown encoding operation is local.

Content

No source excerpt is available for this finding.

Model reasoning scores labeled as measured actually evaluate the local task classifier.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The purported model reasoning test never calls the model: it evaluates the local classifier and can return zero simply because that module is unavailable. Persisting this result as a measured model capability corrupts calibration provenance and can mislead capability-based routing, although it does not demonstrate arbitrary code execution or data theft.

Content

No source excerpt is available for this finding.

Documented calibration budget protection is not implemented.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The budget setting only selects full versus sampled model coverage; it does not enforce a monetary or token budget or implement the advertised insufficient-budget fallback. When functioning credentials are supplied, calibration can therefore issue paid requests across the registry without the promised spending protection.

Content

No source excerpt is available for this finding.

Fallback resolution claims health filtering but retains unhealthy models.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The module documentation at L006 says resolve_with_fallback() filters selections by health status. In contrast, L138 explicitly states that health is used only for sorting, and L154-L158 select backups without excluding unhealthy providers; the primary selected at L118 is also returned without a health-based replacement. When healthy candidates are insufficient, the advertised health-filtered fallback list can therefore include providers already deemed unreachable.

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 · references/models.yaml (reported line 515)May include surrounding context.

yaml
adapter: openai_compat

    base_url: https://api.minimax.chat/v1

    env_hint: MINIMAX_API_KEY

Job creation claims idempotent reuse but always inserts a new batch, permitting duplicate paid requests.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Despite documenting idempotent reuse, create_job generates a new timestamp-based identifier and inserts every task again without checking for an existing matching job. A caller relying on this guarantee during retries can enqueue duplicate paid inference requests, undermining the router's cost-protection claims.

Content

No source excerpt is available for this finding.

The cache promises zero networking but automatically loads a model that can be downloaded remotely.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

When optional sentence-transformers support is installed and fuzzy lookup reaches this branch, constructing a model by name can contact a remote repository and download missing artifacts. This violates the explicit zero-network guarantee and introduces undisclosed outbound traffic and remote-artifact dependencies, though the shown code does not establish prompt exfiltration.

Content

No source excerpt is available for this finding.

Automatic embedding-model loading can download files despite the module's offline claim.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The lazy loader can automatically fetch model files during an ordinary fuzzy-cache lookup without separate download consent. This is the same underlying issue as the other cache finding: an advertised offline component can unexpectedly access external infrastructure and consume network and storage resources.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/eval_suite.py (reported line 91)May include surrounding context.

python
for case in cases:
            tasks.append((mkey, m, case))

    detail_lock = __import__("threading").Lock()
    details = []

    def work(mkey, model, case):

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/router.py (reported line 857)May include surrounding context.

python
import concurrent.futures as cf
    done_n = 0
    fail_n = 0
    lock = __import__("threading").Lock()

    def run_one(item):
        nonlocal done_n, fail_n

Fallback selection retains unhealthy providers despite documenting health-based filtering.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The module documentation at L006 says resolve_with_fallback filters models by health status. Instead, L138-L158 use health only for sorting and take the first max_backups candidates without excluding unhealthy providers; the primary selected at L118-L120 is also returned unchanged. Consequently, the advertised health-filtered fallback list can contain providers already classified as unreachable.

Content

No source excerpt is available for this finding.

Summarization and translation prompts require Chinese output without user opt-in.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The summarization prompt explicitly requests a Chinese summary, and the translation prompt fixes Chinese as the target language. These templates are applied without a language-choice parameter or documented justification for restricting output to Chinese.

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 · scripts/price_checker.py (reported line 26)May include surrounding context.

python
# 厂商价目页(仅公开价目,非全站)
PRICE_PAGES = {
    "deepseek": "https://api.deepseek.com/pricing",
    "qwen": "https://dashscope.aliyuncs.com/pricing",
    "glm": "https://open.bigmodel.cn/pricing",
    "kimi": "https://api.moonshot.cn/pricing",

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/models.yaml (reported line 239)May include surrounding context.

yaml
adapter: openai_compat

    base_url: https://api.moonshot.cn/v1

    env_hint: MOONSHOT_API_KEY