Back to skill

Security audit

A-Share Multi-Dimensional Quantitative Analysis

Security checks for vulnerabilities and agentic risk

Overview

The skill’s finance-analysis purpose is clear, but it uses an insecure remote MCP setup and ships server code with hardcoded authentication and database credentials.

Review before installing or using. Do not send API keys to this endpoint unless it is served over HTTPS with a trusted hostname and the publisher confirms credential rotation, least-privilege database access, and scoped/revocable user tokens. The exposed default token and MongoDB credentials should be treated as compromised.

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
server.py:12
Finding

Hardcoded Default Bearer Token Allows 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 MCP server uses the hardcoded string `yanpan-mcp-secret-2026` whenever the `API_TOKEN` environment variable is absent. The application therefore starts successfully with a publicly known credential instead of failing securely. Because the source code discloses the default token, anyone who can reach the MCP service can authenticate as the shared `default` client. The server also assigns no differentiated scopes or identities, so all clients possessing the token receive access to every registered MCP tool. ### Attack Path 1. An administrator starts `server.py` without explicitly setting `API_TOKEN`. 2. The server silently selects `yanpan-mcp-secret-2026` as its bearer token. 3. The service listens on the configured network interface and port. 4. An attacker obtains the token from the public package or source code. 5. The attacker connects to the MCP endpoint and sends: ```http Authorization: Bearer yanpan-mcp-secret-2026 ``` 6. `StaticTokenVerifier` accepts the token and gives the attacker access to all exposed tools. 7. The attacker queries research reports, news-analysis records, and stock-analysis records through the authenticated MCP interface. ### Impact Assessment An attacker can bypass the intended API-key issuance process and obtain unauthorized read access to all information exposed by the three MCP tools. The affected scope includes broker research report co ...[truncated 364 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
server.py:37
Finding

Hardcoded Public 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, ) return _client ``` ### Technical Analysis The application embeds a default MongoDB host, administrative username, and plaintext password directly in source code. If environment overrides are absent, the application attempts to connect to the public IP address `121.43.242.239` using the `admin` account and the disclosed password. Using `authSource="admin"` with an account named `admin` indicates a potentially highly privileged database identity. The precise MongoDB roles are not shown in the repository, but any permissions assigned to this credential become available to a person who can authenticate with it. No TLS options are configured in the `MongoClient` call. Thus, unless transport security is imposed externally, the connection may also expose credentials and database traffic to network interception. ### Attack Path 1. An attacker reads the public source code and extracts: - Host: `121.43.242.239` - Port: `27017` - Username: `admin` - Password: `tradingagents123` - Authentication database: `admin` 2. The attacker tests whether TCP port 27017 is reachable from their network location. 3. If reachable and the credential remains valid, the attacker authenticates directly to MongoDB using the disclosed values. 4. The attacker enumerates the ...[truncated 1190 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:43
Finding

Bearer API Credential Is Transmitted Over Plaintext HTTP

Content
View full analysis
" } ``` ### Technical Analysis The documented setup instructs users to connect to the MCP service over plaintext HTTP while placing a bearer API key in the `Authorization` header. HTTP provides neither transport encryption nor server authentication. Any party able to observe or alter traffic between the MCP client and server can capture the bearer token. Because bearer credentials confer access solely through possession, the intercepted value can be replayed without knowing any additional secret. An active attacker may also modify MCP responses containing financial research or investment-analysis content. Using a bare IP address additionally provides no hostname identity for normal certificate validation if TLS is later added incorrectly. ### Attack Path 1. A user follows `SKILL.md` and configures the endpoint as `http://42.121.167.42:9800/mcp`. 2. The MCP client sends its API key in an unencrypted `Authorization` header. 3. An attacker with a network observation position—such as a compromised gateway, hostile local network, proxy, or upstream network device—captures the request. 4. The attacker extracts the bearer token from the HTTP header. 5. The attacker replays that token against the MCP endpoint to access the victim's authorized tools. 6. Alternatively, an active network attacker modifies returned research or trading-analysis content before it reaches the agent. ### Impact Assessment Token interception can result in account impersonation and unauthorized access to every MCP operation granted to the captured credential. Exposure may include full research reports, news analysis, sentiment assessments, investment recommendations, and stock trading decisions ...[truncated 288 chars]
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 (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill presents itself as a simple finance-analysis integration, but the analysis indicates additional high-risk behavior: a network-exposed service plus direct MongoDB access using embedded default credentials. Hidden backend behaviors and default credentials materially expand the attack surface and can lead to unauthorized database access, data exposure, and misuse of the service beyond what users reasonably expect.

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
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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The setup instructs users to connect to a hosted MCP endpoint over plain HTTP while sending a bearer token in the Authorization header. This allows interception or modification of authentication tokens and stock-query contents by any party on the network path, which is especially concerning for financial queries and account-linked API access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The server uses a fixed bearer token and directly handles MongoDB credentials in application code, including insecure defaults. In this context, the service is exposed on 0.0.0.0 and grants access to sensitive research/news/analysis data, so weak or default secrets can allow unauthorized access to the MCP tools and backend database.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's docstrings and returned user-visible content are consistently written in Chinese, with no indication that users can choose another language or locale. This creates a language policy concern because the skill appears to enforce a specific language by default rather than offering opt-in or selection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code embeds default MongoDB connection parameters, including a public IP, admin username, and password. If deployed as-is or if the repository is exposed, attackers can directly connect to the database, potentially gaining administrative control over stored data and any adjacent systems accessible through that database account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The project description is written entirely in Chinese ("研报、新闻分析、股票分析 MCP Server") with no indication that users can choose another language or locale. Per the policy, language-specific framing can be a natural-language policy violation when it imposes a locale without documenting opt-in or justification.

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
89% confidence
Finding

The dependency on mcp is specified as >=1.0.0 rather than pinned to a known-safe version, making builds non-reproducible and leaving consumers exposed to whichever release is resolved at install time. Because the package has multiple known advisories and this skill is an MCP server, the dependency is security-relevant in context and could expose the service to known protocol/server-side flaws.

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

The unpinned pymongo dependency allows installation of varying versions, including potentially vulnerable ones, and prevents auditors from confirming whether patched releases are used. Since this skill likely processes broker research and stock-analysis data and may connect to MongoDB, a vulnerable database client could affect data handling or service stability.

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, so deployments may resolve to different versions, including ones affected by known issues such as unsafe file handling in some advisory scenarios. While the risk depends on whether the code actually invokes vulnerable functionality, the manifest still creates avoidable supply-chain uncertainty.

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
84% confidence
Finding

uvicorn is declared with a broad minimum version instead of a pinned safe release, so installations may pick up versions with known HTTP or logging-related vulnerabilities. As an MCP server component likely exposed over the network, web-server dependency hygiene is particularly important because exploitable flaws could affect request handling or log integrity.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.