Back to skill

Security audit

Mx Data

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Eastmoney financial-data query tool, but users should know it sends query text to Eastmoney and saves returned data locally.

Install only if you trust Eastmoney's API with your financial queries and are comfortable storing results in local output files. Treat generated Excel files as untrusted data exports, especially before opening them in spreadsheet software, and avoid sending secrets or highly confidential research text as queries.

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

T09 · Insecure Skill Coding Practices

Warning
Location
mx_data.py:289
Finding

Spreadsheet Formula Injection in Generated Excel Workbooks

Content
View full analysis
str: """Flatten any value to string """ if v is None: return "" if isinstance(v, (dict, list)): return json.dumps(v, ensure_ascii=False) return str(v) ``` ```python with pd.ExcelWriter(file_path, engine="openpyxl") as writer: for table in tables: df = pd.DataFrame(table["rows"], columns=table["fieldnames"]) df.to_excel(writer, sheet_name=table["sheet_name"], index=False) ``` ### Technical Analysis The application treats values, labels, and other tabular content returned by the remote financial API as trusted spreadsheet content. `flatten_value()` converts these values to strings without checking whether they begin with a spreadsheet formula marker. The resulting values are then passed directly to `pandas.DataFrame.to_excel()` using the `openpyxl` engine. In particular, a string beginning with `=` can be stored as a formula rather than inert text. Consequently, an attacker who can influence the API response—or an attacker who compromises the remote API or an upstream data source—could inject a formula into the generated workbook. The same issue may affect API-derived column labels as well as ordinary cell values because both are written to the workbook without formula neutralization. ### Attack Path 1. An attacker gains the ability to influence a value or label returned by `mkapi2.dfcfs.com`, whether through compromised upstream data, compromised API infrastructure, or another API data-injection vector. 2. The attacker supplies a value beginning with `=`, containing a malicious spreadsheet formula. 3. `table_to_rows()` passes the value through `flatten_value()`, which preserves the formula syntax. 4. `write_output_files()` places the value into a pandas DataFrame and exports i ...[truncated 1199 chars]
Remediation
View remediation
str: text = flatten_value(value) if text.startswith(("=", "+", "-", "@")): return "'" + text return text ``` 2. Apply the sanitizer to every untrusted cell value and column label before constructing the DataFrame: ```python safe_rows = [ { sanitize_excel_cell(key): sanitize_excel_cell(value) for key, value in row.items() } for row in table["rows"] ] safe_columns = [sanitize_excel_cell(name) for name in table["fieldnames"]] df = pd.DataFrame(safe_rows, columns=safe_columns) ``` 3. Prefer explicit text formatting for cells containing remote data. Where practical, write cells through `openpyxl` with their data type forced to text rather than relying only on prefix escaping. 4. Sanitize every API-controlled workbook component, including: - Data cell values - Column headers - Entity and indicator labels - Descriptive metadata written into spreadsheet cells 5. Add regression tests using values such as: ```text =1+1 =HYPERLINK("https://example.invalid","Open") +SUM(1,1) -1+2 @SUM(1,1) ``` The tests should reopen the generated workbook with `openpyxl` and verify that each value is stored as literal text rather than with the formula data type. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares access to sensitive capabilities in practice (environment secret usage, network access, and file output) but does not define an explicit permission or allowed-tools scope. This creates an overbroad trust boundary where a host agent may permit more actions than users expect, reducing reviewability and increasing the chance of unintended secret exposure, outbound requests, or filesystem writes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The skill sends user-provided query text to an external third-party endpoint and authenticates the request with an API key, which is a real data exfiltration surface even if it is the intended product behavior. In this context the risk is contextual rather than overtly malicious: sensitive prompts, proprietary financial queries, or embedded secrets could be transmitted off-platform, and the undeclared scope makes that behavior less transparent.

Content

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

  • 凭据保护: API Key 仅通过环境变量 MX_APIKEY 在服务端或受信任的运行环境中使用,不会在前端明文暴露。
javascript
curl -X POST --location 'https://mkapi2.dfcfs.com/finskillshub/api/claw/query' \
--header 'Content-Type: application/json' \
--header 'apikey: YOUR_API_KEY' \
--data '{"toolQuery": "东方财富最新价"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This is a confirmed external transmission: the skill sends user input to a remote endpoint over the network. In this skill's context, such transmission is expected for a financial data API, but it remains security-relevant because the query content may be sensitive and the code does not surface that trust boundary or offer controls around transmission.

Content

Scanner excerpt · mx_data.py (reported line 188)May include surrounding context.

python
"toolQuery": tool_query
        }
        
        response = requests.post(self.BASE_URL, headers=headers, json=data, timeout=30)
        response.raise_for_status()
        return response.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill transmits the user's natural-language query to a third-party remote API and includes an API key in the request headers, but it does not provide any explicit warning or consent mechanism before sending user-supplied content off-host. In a financial-data context, queries may reveal sensitive research intent, watchlists, or proprietary analysis topics, so undisclosed external transmission creates a real privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The tool stores query-derived artifacts on disk, including a raw JSON response and filenames derived from the query, without warning the user that both their query and returned financial data will be persisted locally. This can expose sensitive business research, investment intent, or proprietary data to other local users, backups, or later processes that read the workspace.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The file's human-facing descriptions and terminal messages are consistently in Chinese, and there is no natural-language indication that users may select another language or locale. Under the policy, forcing a specific language without opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says the skill provides financial data querying for quotes, financials, and relationship data, which implies retrieval functionality. This implementation goes beyond querying by writing multiple local artifacts containing the returned data, making the skill a data export/persistence tool as well as a query tool.

Content

No source excerpt is available for this finding.