Back to skill

Security audit

Virtuoso Skill

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate Virtuoso Skill API helper, but its optional web mode exposes an unauthenticated service and renders database content unsafely.

Install only if you are comfortable with a Chinese-language Virtuoso Skill API helper. Use the CLI modes normally; if you use web mode, bind it to localhost or restrict it with a firewall, and do not load API databases from untrusted sources.

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
scripts/skill_chatbot.py:311
Finding
Stored DOM-Based Cross-Site Scripting in Web Search Results<![CDATA[ ## Vulnerability Details **File Location**: `scripts/skill_chatbot.py:311-337` **Vulnerability Type**: Stored DOM-based cross-site scripting caused by unsafe HTML construction **Risk Level**: Medium ### Vulnerable Code ```javascript data.results.forEach(function(func) { html += `<div class="result">`; html += `<h3>${func.name} <span class="category">${func.category}</span></h3>`; html += `<p class="description"><strong>描述:</strong> ${func.description}</p>`; html += `<div class="syntax"><strong>语法:</strong> ${func.syntax}</div>`; if (func.parameters.length > 0) { html += `<div class="parameters"><strong>参数:</strong><ul>`; func.parameters.forEach(function(p) { const required = p.required ? '必填' : '可选'; html += `<li class="param">${p.name}: ${p.description} (${p.type}, ${required})</li>`; }); html += `</ul></div>`; } html += `<p><strong>返回类型:</strong> ${func.return_type}</p>`; if (func.example) { html += `<div class="example"><strong>示例:</strong>\n${func.example}</div>`; } if (func.notes) { html += `<p class="notes"><strong>注意:</strong> ${func.notes}</p>`; } html += `</div>`; }); document.getElementById('results').innerHTML = html; ``` ### Technical Analysis The browser interpolates API database fields directly into an HTML string and assigns the result to `innerHTML`. No contextual output encoding or HTML sanitization is applied to fields such as `name`, `category`, `description`, `syntax`, parameter properties, `return_type`, `example`, or `notes`. These fields originate from a JSON database loaded by the server. The command-line interface permits the operator to select a database using `--db`, so the database cannot always be treated as trusted. An attacker-controlled value such as an image element with an `onerror` handler would be parsed as active HTML when a matching search result is displayed. The ...[truncated 1539 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not construct result markup by interpolating database values into HTML strings. 2. Create DOM nodes with `document.createElement()` and assign all database-derived values through `textContent`. 3. If formatted HTML is an explicit requirement, sanitize every untrusted field with a maintained allowlist-based HTML sanitizer before insertion. 4. Validate loaded JSON against a strict schema, including expected types, field lengths, and permitted structures. 5. Treat all custom `--db` input as untrusted, even when the database is stored locally. 6. Add a restrictive Content Security Policy that disallows inline scripts and event handlers as a defense-in-depth measure. 7. Add regression tests containing payloads in every displayed database field and confirm they are rendered as literal text rather than executable markup. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/skill_chatbot.py:378
Finding
Unauthenticated Web Service Exposed on All Network Interfaces<![CDATA[ ## Vulnerability Details **File Location**: `scripts/skill_chatbot.py:378-380` **Vulnerability Type**: Unrestricted network binding and missing access control **Risk Level**: Low ### Vulnerable Code ```python print(f"启动Web服务器在 http://0.0.0.0:{port}") print("在浏览器中打开该地址即可使用图形化查询界面") app.run(host='0.0.0.0', port=port, debug=False) ``` ### Technical Analysis Web mode unconditionally binds the Flask service to `0.0.0.0`, making it listen on every available IPv4 network interface. The application provides no authentication, authorization, rate limiting, request-size restriction, or trusted-network enforcement. Binding to all interfaces is broader than necessary for a local API search utility. The exposure also increases the reachable attack surface of the DOM XSS issue because network users can access the vulnerable interface whenever host firewall and network rules permit it. The Flask development server is also not intended to be used as a hardened Internet-facing production server. ### Attack Path 1. An operator launches the tool with the `--web` option. 2. The Flask server binds to every network interface on the selected port, which defaults to port 8080. 3. The host firewall or surrounding network permits another system to reach that port. 4. An unauthenticated remote user connects to the service. 5. The remote user queries the API database or repeatedly submits requests to consume application resources. 6. If a malicious database record is present, a remote visitor can also encounter the DOM XSS payload when viewing its search result. ### Impact Assessment A network-reachable attacker can access and query the service without credentials. The immediate data exposure is limited to the API reference information returned by the application, and no privileged administrative endpoint was identified. However, unrestricted access can: - Expose locally intended service functionality to untrusted networks. - Permit unauthenticated resource consumpt ...[truncated 322 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Bind to `127.0.0.1` by default: ```python app.run(host="127.0.0.1", port=port, debug=False) ``` 2. Add an explicit `--host` option when remote access is required, and display a security warning when a non-loopback address is selected. 3. Require authentication before permitting access from non-loopback interfaces. 4. Add request-body size limits, rate limiting, connection timeouts, and appropriate logging. 5. Apply host-level firewall rules restricting access to approved source addresses. 6. For shared or production use, run the application behind a hardened WSGI server and reverse proxy with TLS and access controls rather than Flask's development server. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documented purpose claims code validation, legality checking, intelligent completion, and prevention of undefined API usage, but the observed behavior includes starting a web server and lacks the promised enforcement features. This mismatch is dangerous because users may trust the skill to validate code or constrain behavior when it actually exposes network functionality and may provide incomplete or misleading safety assurances.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill advertises capabilities consistent with file read/write and network access, but it does not declare any explicit tool scope such as permissions or allowed-tools. That makes the execution boundary ambiguous and can allow broader-than-expected access when the skill is run in an agent environment, increasing the risk of unintended file modification or network exposure.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The manifest description, headings, and example interactions are entirely in Chinese, including the direct-query examples and chatbot dialogue. This effectively imposes a specific language/locale for use of the skill, and the file does not indicate that other languages are supported or that Chinese is an intentional opt-in choice.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This JSON reference database uses Chinese throughout its metadata, category names, descriptions, examples, and UI text, such as the description field and prompts like "请输入名称:". Because the file provides no indication of language choice, opt-in, or documented locale constraint, it appears to impose a specific language/locale on users.

Ae2

Medium
Category
analysis-evasion
Confidence
90% confidence
Finding
Artifact content does not match its filename extension

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The module description, CLI usage examples, prompts, and user-facing responses are all written exclusively in Chinese, indicating the skill is designed to operate in a single language. The file does not provide any option for users to select another language or explicitly opt into Chinese-only behavior, which is a natural-language locale policy concern under the rule.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The web server is started with host='0.0.0.0', making it reachable from other machines on the network, even though the tool is primarily a local assistant for API lookup. Exposing an unauthenticated HTTP service broadens the attack surface and can permit unintended remote use, service abuse, and delivery of untrusted database content to browsers.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This Python file contains natural-language descriptions and CLI output entirely in Chinese, starting with the module docstring and continuing throughout the script. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the constraint is explicitly justified, which is not present here.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The module docstring and function docstring are written only in Chinese, and all user-facing print messages in the script are also Chinese. This imposes a specific language on users without any opt-in or alternative, which matches the locale/language policy concern for natural-language content.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The module docstring and later user-facing print messages are written only in Chinese, which imposes a specific language on users of the skill. For a general-purpose parsing script, there is no visible opt-in, language selection mechanism, or documented regional justification for this locale restriction.

Description-Behavior Mismatch

Low
Confidence
83% confidence
Finding
The manifest describes a development assistant for querying APIs, checking code, and intelligent completion, which fits the local search/chatbot portions of this script. However, this file additionally starts a Flask server bound to 0.0.0.0, turning the tool into a network service; serving HTTP requests is not mentioned in the manifest and is not an obvious requirement of the stated assistant scope.

Static analysis

No suspicious patterns detected.