Back to skill

Security audit

NVIDIA LLM 智能路由 Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it ships risky credential and data-routing behavior that users should review before installing.

Install only if you are comfortable with your prompts being sent to NVIDIA-compatible remote model endpoints and with local license/usage state being written under your home directory. Set your own NVIDIA_API_KEY, avoid using custom base_url values you do not fully trust, do not send secrets or regulated data through hedged routing, and treat the WeChat subscription flow as a third-party payment arrangement outside the platform.

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

T09 · Insecure Skill Coding Practices

Error
Location
nvidia_llm/core.py:55
Finding

Hardcoded NVIDIA API Credential Exposed in Package Source

Content
View full analysis
dict: return {"Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json"} ``` ### Technical Analysis The package contains a live-format NVIDIA API key as the default value when the `NVIDIA_API_KEY` environment variable is absent. Because Python package source is available to every recipient, this value cannot be treated as a secret. The fallback behavior also means normal users may unknowingly issue requests under the embedded credential rather than a credential they control. The key is placed in a bearer authorization header and used for requests to the NVIDIA API. Embedding a shared credential violates secret-management principles and prevents reliable attribution, rotation, per-user revocation, and quota isolation. ### Attack Path 1. An attacker downloads or installs the package. 2. The attacker opens `nvidia_llm/core.py` or searches the package for strings beginning with `nvapi-`. 3. The attacker extracts the embedded credential. 4. The attacker sends requests directly to the NVIDIA API with: ```http Authorization: Bearer ``` 5. Requests consume the credential owner's quota and may incur costs until the key is revoked. ### Impact Assessment An attacker can obtain the same NVIDIA API authorization represented by the embedded key. Depending on the key's server-side permissions, this may allow: - Unauthorized model inference requests. - Consumption of API quotas or paid resources. - Service disruption through quota exhaustion. - Loss of request attrib ...[truncated 246 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
nvidia_llm/core.py:318
Finding

Caller-Controlled Endpoint Can Receive NVIDIA Credentials and Private Prompts

Content
View full analysis
dict: p = { "model": model_id, "messages": messages, "temperature": temperature, "max_tokens": max_tokens, "top_p": top_p, "stream": stream, } if enable_reasoning: p["chat_template_kwargs"] = {"enable_thinking": True} p["reasoning_budget"] = reasoning_budget return p ``` The API credential is attached to requests without validating the destination: ```python def _headers(self) -> dict: return {"Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json"} ``` ```python resp = request ...[truncated 2307 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
nvidia_llm/auth.py:270
Finding

Client-Side Activation Scheme Allows Forging Paid VIP Licenses

Content
View full analysis
bool: """ 通过订阅码激活 VIP 订阅码格式: PLAN-TIMESTAMP-HASH 例如: yearly-1752537600-a1b2c3d4 """ try: parts = activation_code.strip().split("-") if len(parts) != 3: return False plan = parts[0] timestamp = int(parts[1]) hash_part = parts[2] if plan not in PLANS or plan == "free": return False # 验证签名 (简易防篡改) expected = hashlib.md5(f"{plan}:{timestamp}:{AUTHOR_ID}".encode()).hexdigest()[:8] if hash_part.upper() != expected.upper(): return False # 时间戳不能太旧 (7天内有效) if abs(time.time() - timestamp) > 7 * 86400: return False return self.activate(plan) except Exception: return False ``` The package also exposes code that directly generates accepted activation codes: ```python def generate_activation_code(self, plan: str) -> str: """生成订阅激活码 (作者专用, 给付费用户生成)""" if plan not in PLANS or plan == "free": return "" timestamp = int(time.time()) hash_part = hashlib.md5(f"{plan}:{timestamp}:{AUTHOR_ID}".encode()).hexdigest()[:8] return f"{plan}-{timestamp}-{hash_part.upper()}" ``` ### Technical Analysis The activation code is not cryptographically signed. It is a truncated checksum over: - A user-selected plan. - A current timestamp. - A public constant embedded in the package. No secret key is involved, and the package distributes the generation algorithm itself. Theref ...[truncated 1784 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (41)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The finding suggests the skill claims model-routing functionality but instead includes local payment QR/image handling and opening files with the system default program. Launching local files or external handlers is a materially different capability from AI routing and can create user-deception and local-execution risks, especially if users do not expect desktop interaction or file access from the advertised feature set.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding suggests the skill claims model-routing functionality but instead includes local payment QR/image handling and opening files with the system default program. Launching local files or external handlers is a materially different capability from AI routing and can create user-deception and local-execution risks, especially if users do not expect desktop interaction or file access from the advertised feature set.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding suggests the skill claims model-routing functionality but instead includes local payment QR/image handling and opening files with the system default program. Launching local files or external handlers is a materially different capability from AI routing and can create user-deception and local-execution risks, especially if users do not expect desktop interaction or file access from the advertised feature set.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file's behavior materially diverges from the advertised purpose of an LLM routing skill by implementing a monetization, paywall, invite-reward, and license-enforcement subsystem. In a skill ecosystem, this is dangerous because it introduces undeclared access-control and commercial gating logic that can mislead users, bypass platform expectations, and create trust and supply-chain risk unrelated to the claimed functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The exported API surface includes subscription, activation, invite, and payment-related functions that are unrelated to the stated LLM routing purpose. This capability expansion increases trust and supply-chain risk because a user importing a model-routing skill is also receiving monetization and account-control features that may trigger local state changes, payment flows, or further module imports outside the expected scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The module embeds a hardcoded default API key and uses it automatically when no environment variable is set, causing external network transmission under credentials the user did not provide. This is dangerous because it masks outbound data flow, may expose prompts to a third-party account, and could indicate credential leakage or unauthorized use of a shared secret.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

A WeChat payment entry point is not justified by the declared purpose of an LLM routing skill and materially broadens the module's operational scope. Payment-related capabilities create financial-risk pathways and can lead to deceptive prompting, unauthorized payment initiation flows, or import of additional unreviewed payment logic.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

README 宣传“智能路由”“自动降级”“并发请求(Hedge)取最快响应”,但没有明确告知用户其输入可能被发送到多个远端模型服务或备用提供方。这会造成数据流向不透明,用户可能在不知情情况下将敏感内容同时暴露给多个第三方服务,带来隐私、合规和保密风险。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

README 将“medical | 医疗诊断”作为普通场景直接推广,却未提供任何高风险用途限制、准确性免责声明或人工复核要求。该技能是面向多模型自动路由的通用 LLM 封装,若被用于医疗诊断,错误路由、幻觉或不稳定降级可能直接影响健康相关决策,风险高于一般聊天用途。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises code-capable behavior implying access to environment variables, filesystem, network, and shell-like operations, yet the manifest declares no explicit tool scope or permissions. In an agent ecosystem, this creates a trust-boundary problem: consumers cannot accurately assess what the skill may access, increasing the risk of unexpected data exposure or command/network side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README tells users to configure an API key but does not warn that prompts and related content may be sent to external NVIDIA NIM services. This omission undermines informed consent and can lead users to submit sensitive code, secrets, or personal data without understanding that it leaves the local environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring and all displayed status, plan, and subscription messages are written in Chinese, which effectively imposes a specific language on all users. There is no opt-in, language selection mechanism, or documentation that this skill is intentionally limited to a Chinese-speaking region or audience.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The module derives a machine-bound identifier from /etc/machine-id or the user's home path to bind licenses, even though device fingerprinting is not necessary for model routing. This creates unnecessary host-identification and privacy exposure, and in a skill context it is more suspicious because the collection is unrelated to the stated capability.

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 presents the CLI description, usage comments, and example prompts entirely in Chinese, including example user inputs like "你好" and "讲故事". This imposes a specific language/locale in the user-facing interface without any visible opt-in or alternative language selection, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says the skill is an 'NIM 大模型智能路由 Skill' focused on automatic model routing and fallback. In this file, the documented CLI scope includes payment/subscription-style account features such as subscribe, activate, invite, and membership status, which are distinct product/account operations rather than core model-routing behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The command handlers invoke subscription-related functions like subscribe, activate, invite, my_invite_code, and subscription_status. These are business-account capabilities that go beyond a straightforward LLM smart-routing interface and materially expand the skill's behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The top-level natural-language documentation is entirely in Chinese and presents the skill identity, features, and usage in that language only. There is no indication of language choice, fallback, or justification for restricting documentation and interaction guidance to a specific locale.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · nvidia_llm/core.py (reported line 355)May include surrounding context.

python
# 订阅授权
        self.enable_auth = enable_auth
        self._auth = None
        if enable_auth:
            try:
                from .auth import AccessControl

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The chat and stream paths enforce access control and inject upgrade prompts into model responses, changing the behavior from pure routing to product monetization and user coercion. In a skill ecosystem, hidden feature-gating is dangerous because it can unexpectedly block automation, alter outputs, and encourage users to invoke unrelated subscription commands.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This code transmits user prompts and optional conversation context to an external NVIDIA API endpoint over the network. External transmission is expected for an LLM client, but it remains security-relevant because sensitive input may leave the local environment; the risk is heightened here by the hardcoded fallback credential and broad routing behavior.

Content

Scanner excerpt · nvidia_llm/core.py (reported line 753)May include surrounding context.

python
if self.enable_reasoning:
            p["chat_template_kwargs"] = {"enable_thinking": True}
            p["reasoning_budget"] = kw.get("reasoning_budget", self.reasoning_budget)
        return requests.post(
            f"{BASE_URL}/chat/completions",
            headers={"Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json"},
            json=p, stream=stream, timeout=kw.get("timeout", 120),

Ssd 3

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The LLM.say method stores all prior user and assistant messages in memory and resends them on later requests, which can unintentionally disclose previously supplied secrets or sensitive context to the remote model provider. In an LLM skill, this is more dangerous because users often paste credentials, code, or private business data into prompts without realizing the entire conversation may be retransmitted.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Invite-code and VIP activation features are unrelated to model routing and introduce account/state mutation behavior into a package expected to perform inference calls only. This mismatch raises supply-chain concerns because users may unknowingly execute licensing or referral logic when they only intended to use an inference router.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module’s user-facing instructions are entirely in Chinese and specifically require WeChat for payment, with no indication that other languages or locales are supported. This can violate a language/locale policy when users are not given an opt-in choice or an alternative localized flow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill launches external system programs to display a payment QR code, which is beyond what users would reasonably expect from an LLM routing skill. Even without classic code injection, unexpected host interaction increases risk, can trigger arbitrary associated applications, and normalizes payment-oriented behavior unrelated to the declared capability.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · nvidia_llm/payment.py (reported line 43)May include surrounding context.

python
system = platform.system()
    try:
        if system == "Darwin":
            subprocess.Popen(["open", str(_QR_FILE)])
        elif system == "Windows":
            subprocess.Popen(["cmd", "/c", "start", "", str(_QR_FILE)])
        else: