Back to skill

Security audit

A-Share Multi-Dimensional Quantitative Analysis

Security checks for vulnerabilities and agentic risk

Overview

The finance-analysis tools match the stated purpose, but the package needs review because it uses plaintext bearer-token setup guidance and ships server code with hardcoded default authentication and database administrator credentials.

Review this before installing or using it. Do not send valuable API keys or sensitive financial queries to the documented HTTP endpoint unless you trust the operator and accept plaintext transport risk. For self-hosting, remove all hardcoded secrets, rotate exposed credentials, require HTTPS, use least-privilege database accounts, pin dependencies, add scopes or rate limits, escape search input, and cap result limits.

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

T09 · Insecure Skill Coding Practices

Error
Location
server.py:41
Finding

Hard-Coded MongoDB Administrator Credentials

Content
View full analysis
MongoClient: global _client if _client is None: _client = MongoClient( host=os.getenv("MONGODB_HOST", "121.43.242.239"), port=int(os.getenv("MONGODB_PORT", "27017")), username=os.getenv("MONGODB_USERNAME", "admin"), password=os.getenv("MONGODB_PASSWORD", "tradingagents123"), authSource=os.getenv("MONGODB_AUTH_SOURCE", "admin"), serverSelectionTimeoutMS=10000, ) ``` ### Technical Analysis The application embeds a public IP address, an administrator username, and a password as default configuration values. Environment variables only override these values; they do not prevent the defaults from being used. Anyone with access to the source can recover the credentials and attempt direct authentication against the externally addressed MongoDB service. The use of the `admin` account and `admin` authentication database indicates potentially broad database privileges rather than a least-privileged, application-specific account. The credentials must be considered compromised regardless of whether network filtering currently prevents external access. ### Attack Path 1. An attacker obtains the publicly distributed project source. 2. The attacker extracts the MongoDB host, port, username, password, and authentication database. 3. The attacker connects to `121.43.242.239:27017` using the disclosed credentials. 4. If the database is reachable and the credentials remain valid, the attacker enumerates databases and collections available to the `admin` account. 5. The attacker reads, modifies, deletes, or exfiltrates financial research, news-analysis, and stock-analysis data according to the account's granted privileges. ### Impact Assessment Successful exploitation may pro ...[truncated 346 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
server.py:12
Finding

Predictable Default Bearer Token Permits Unauthorized MCP Access

Content
View full analysis
AccessToken | None: if token == API_TOKEN: return AccessToken(token=token, client_id="default", scopes=[]) return None ``` ### Technical Analysis The server falls back to a fixed bearer token when `API_TOKEN` is not set. Because the fallback appears in distributed source code, it is not secret. Any deployment that omits or incorrectly configures the environment variable will accept a token known to every person who can inspect the package. The verifier gives every successful request the same `default` identity and does not require scopes. Consequently, possession of the shared token grants access to every registered MCP tool. ### Attack Path 1. An attacker reads the source and obtains the default token. 2. The attacker locates a deployment running on the documented MCP port. 3. The attacker submits requests with the disclosed token in the `Authorization: Bearer` header. 4. If the deployment uses the fallback, authentication succeeds as the shared `default` client. 5. The attacker invokes research-report, news-analysis, and stock-analysis tools without authorization. ### Impact Assessment The attacker can remotely query all information exposed by the MCP tools and consume server and database resources. This may disclose full research reports and internal analysis records. Repeated or expensive requests may also degrade service availability. The shared identity prevents meaningful per-client attribution and revocation. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:36
Finding

Bearer Credentials and Financial Queries Transmitted over Plaintext HTTP

Content
View full analysis
" } } } } ``` ### Technical Analysis The documented configuration instructs clients to send bearer credentials to a public IP address using unencrypted HTTP. HTTP provides neither transport confidentiality nor server authentication. An attacker with visibility or control over any network segment between the client and server can capture the authorization header, observe financial queries and responses, or modify responses in transit. Because bearer tokens confer access solely through possession, a captured token can be replayed directly. ### Attack Path 1. A user configures the MCP client according to the documentation. 2. The client sends the API key and tool requests over plaintext HTTP. 3. A network-positioned attacker captures the `Authorization` header. 4. The attacker replays the bearer token against the MCP endpoint. 5. Alternatively, the attacker modifies returned financial reports or trading-analysis content before it reaches the agent. ### Impact Assessment A successful interception can expose API credentials, company queries, stock codes, research reports, and analysis responses. Token theft permits unauthorized use for as long as the credential remains valid. Response tampering can corrupt agent conclusions and potentially influence financial decisions. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
server.py:71
Finding

Unescaped Regular Expressions and Unbounded Result Limits Enable Resource Exhaustion

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims to provide stock-analysis functions, but the detected behavior includes an undeclared bearer-token auth mechanism and access to a remote MongoDB instance with hardcoded default host/credentials. This mismatch is high risk because hidden external connectivity and embedded credentials can enable unauthorized data access, secret leakage, backend compromise, or use of the skill as a covert data exfiltration path.

Content

No source excerpt is available for this finding.

Possible Typosquatting: 'uvicorn' resembles popular package 'gunicorn'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill declares no explicit tool scope or permission boundaries, yet the associated capability analysis indicates access to environment data. In an MCP/agent setting, undeclared access paths are dangerous because they can expose secrets or expand the skill's effective privileges beyond what a user would reasonably expect from a finance-analysis tool.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The server uses a hardcoded default API bearer token and hardcoded fallback MongoDB host and admin credentials if environment variables are absent. Because the service binds to 0.0.0.0 and exposes data-retrieval tools backed by that database, an attacker who knows or guesses these defaults could authenticate to the MCP server or directly access the MongoDB instance, leading to unauthorized disclosure and possible administrative compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code reads authentication material and database credentials, including API_TOKEN and MongoDB username/password, but provides no user-facing log, prompt, comment, or docstring warning that the skill relies on sensitive credentials and will connect using them. For code files, sensitive environment-variable or credential access should have some form of disclosure unless already clearly documented elsewhere, which is not visible in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file's user-facing docstrings, comments, and returned report text are consistently in Chinese, which effectively fixes the interaction locale without offering a language choice or documenting a justified locale constraint. The policy explicitly flags language or locale constraints when the skill does not provide opt-in or user choice.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: mcp has 12 known advisory(ies) (CVE-2025-53366 (MCP Python SDK vulnerability in the FastMCP Server causes validation error, lead); CVE-2025-66416 (Model Context Protocol (MCP) Python SDK does not enable DNS rebinding protection); CVE-2026-52870 (MCP Python SDK: Experimental task handlers allow any client to access and cancel) +9 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The dependency on mcp[cli] is only lower-bounded (>=1.0.0) rather than pinned or tightly constrained, so builds are not reproducible and may resolve to vulnerable releases if the environment or lock state changes. This is especially relevant because MCP server components are network-facing and the listed advisories include server-side issues such as validation and DNS rebinding weaknesses.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pymongo has 4 known advisory(ies) (CVE-2024-5629 (PyMongo Out-of-bounds Read in the bson module ); CVE-2013-2132 (Use of NullPointerException Catch to Detect NULL Pointer Dereference in Pymongo); CVE-2013-2132 (bson/_cbsonmodule.c in the mongo-python-driver (aka. pymongo) before 2.5.2, as u) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
82% confidence
Finding

pymongo is specified with an open-ended minimum version, so the actual installed version may vary and could include releases affected by known advisories. While the manifest alone does not prove exploitation, the lack of pinning makes it impossible to verify that deployments consistently avoid vulnerable versions.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: python-dotenv has 2 known advisory(ies) (CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via ); CVE-2026-28684 (python-dotenv reads key-value pairs from a .env file and can set them as environ)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
80% confidence
Finding

python-dotenv is also unpinned, which means an install may pull different versions over time, including versions with known security issues. In projects that manipulate .env files or run in automation contexts, this can become more dangerous because file-handling flaws may affect local configuration integrity.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: uvicorn has 4 known advisory(ies) (CVE-2020-7694 (Log injection in uvicorn); CVE-2020-7695 (HTTP response splitting in uvicorn); CVE-2020-7694 (This affects all versions of package uvicorn. The request logger provided by the) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
86% confidence
Finding

uvicorn is a network-exposed ASGI server package, and leaving it unpinned means deployments may resolve to versions with known HTTP or logging-related vulnerabilities. Because this skill is an MCP server, weaknesses in the serving layer are more relevant than they would be in an offline-only tool.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.