Back to skill

Security audit

Stroke Risk Screening Analysis Skill | 脑卒中风险筛查分析技能

Security checks for vulnerabilities and agentic risk

Overview

The skill’s medical screening purpose is coherent, but it silently creates or reuses persistent user identities and cloud report access for sensitive face and health data without enough user control.

Install only in a single-user or tightly controlled workspace unless the publisher fixes identity isolation. Users should understand that face media, physiological indicators, and report history may be sent to external lifeemergence.com services and tied to a persistent local/cloud identity; avoid using the history feature where multiple people share the same agent workspace.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
skills/smyx_common/scripts/util.py:440
Finding

Shared Fallback Identity Allows Cross-User Access to Sensitive Health Reports

Content
View full analysis

Vulnerability Details

File Location: skills/smyx_common/scripts/util.py:440-469
Related Locations: scripts/stroke_risk_screening_analysis.py:220-226, skills/smyx_analysis/scripts/skill.py:142-165, SKILL.md:89-92
Vulnerability Type: Improper user identity isolation and cross-user data access
Risk Level: Medium

Complete Code Snippets

skills/smyx_common/scripts/util.py:440-469:

python
user = user_dao.get_first_default_user(cls.DEFAULT_PREFIX, cls.DEFAULT_USERNAME_LENGTH)
if user and user.username:
    return user.username

# Retry on the extremely unlikely event of a username collision.
for _ in range(10):
    username = cls.generate_default_open_id()
    if user_dao.get_by_username(username):
        continue
    now = datetime.now()
    user = User(
        id=uuid.uuid4().hex,
        username=username,
        realname=username,
        source=ConstantEnum.APP__SOURCE,
        del_flag=0,
        create_time=now,
        update_time=now
    )
    user_dao.add(user)
    return username

raise RuntimeError("Failed to generate default open-id after repeated collisions")

@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    """Resolve and initialize the current open-id."""
    resolved_open_id = (open_id or "").strip() if isinstance(open_id, str) else open_id
    if not resolved_open_id and use_current:
        resolved_open_id = ConstantEnum.CURRENT__OPEN_ID or ConstantEnum.CURRENT__USER_NAME
    if not resolved_open_id:
        resolved_open_id = cls.get_api_key_file_open_id()
    if not resolved_open_id:
        resolved_open_id = cls.get_or_create_default_open_id()

The original source comments and exception message are in Chinese; they are translated above without changing the executable behavior.

scripts/stroke_risk_screening_analysis.py:220-226:

python
# Initialize the internal user identity
...[truncated 3937 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the workspace-global fallback identity from multi-user execution paths.
  2. Require a verified, caller-specific principal before uploading health data or returning report history. Fail closed when such an identity is unavailable.
  3. Bind each local identity record to an authenticated upstream user and tenant rather than selecting the first matching User_... record.
  4. Pass the verified principal explicitly through the report-list call chain instead of relying on mutable global identity and token state.
  5. Enforce report ownership and tenant checks on the server for every list, detail, and export request. Do not rely only on client-provided usernames.
  6. Store authentication tokens in records uniquely scoped to the verified caller, and prevent token reuse across unrelated sessions or users.
  7. If a single-user fallback mode is required for local installations, make it an explicit configuration mode, disable report-history access by default, and reject concurrent or multi-user use.
  8. Add integration tests with two distinct callers to verify that one caller cannot list, retrieve, or export the other caller's reports.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to read local credentials, generate/persist user identities, interact with local databases, and auto-login/register to remote APIs while presenting itself primarily as a stroke-risk screening capability. That combination is dangerous because it expands the sensitive-data footprint and creates hidden identity correlation and exfiltration paths for health-related information.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: "stroke-risk-screening-analysis"
description: "Combines TCM facial feature recognition with physiological indicator information to provide early warnings of high-risk stroke conditions such as cerebral infarction and cerebral hemorrhage, and provides lifestyle intervention suggestions and medical guidance. | 脑卒中风险筛查技能,结合中医面部特征辨识结合生理指标信息,提前预警脑梗塞、脑出血等脑卒中高危状态,给出生活干预建议和就医指引"
version: "1.0.19"
license: "MIT-0"
---

# 🧠 Stroke Risk Screening Analysis Skill | 脑卒中风险筛查分析技能
> **智能分�

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The implementation behaves as a generic video analysis CLI, while the manifest describes a stroke-risk screening skill. This mismatch is dangerous because it can conceal undeclared functionality, cause users to submit sensitive medical media under false expectations, and route data to processing paths not covered by the stated purpose or consent model.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

This service exposes broad generic CRUD and transport-wrapper methods (add/edit/delete/http_get/http_post/http_put/http_delete) that are not constrained to the stated stroke-risk screening purpose. In a medical screening skill, such unconstrained network primitives can be reused by higher-level code to access unrelated backends or perform unintended remote actions, increasing the blast radius well beyond the declared functionality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The http_post/http_put/http_get/http_delete methods accept caller-supplied URLs and forward them directly to the request utility, enabling arbitrary outbound network access from any code that can invoke this service. For a stroke-risk screening skill, this is unjustified and dangerous because it can be abused for data exfiltration, access to unapproved services, or hidden secondary functionality unrelated to medical screening.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code resolves a persistent open-id by reading workspace files, reusing local database records, and generating fallback identifiers when none are supplied. That enables implicit cross-session identity persistence and tracking without transparent disclosure, which is especially sensitive in a medical-context skill handling health-related interactions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The utility layer performs remote account provisioning and silent registration/login via /sys/phoneLogin, which is outside the declared stroke-risk screening purpose. This creates undisclosed identity creation and backend enrollment behavior, increasing privacy risk and enabling hidden service coupling and tracking without clear user consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and appears to require powerful capabilities including shell execution, filesystem access, environment access, and network access, but does not declare any explicit tool scope or permissions boundary. In an agent setting, this weakens least-privilege controls and makes it easier for a medical-facing skill to access or transmit data beyond what users would reasonably expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Core labels, goals, trigger conditions, workflow, and examples are primarily specified in Chinese, and the trigger phrases are defined only in Chinese. The file does not state that use is limited to Chinese-speaking users or provide an explicit language-choice mechanism, which may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Overly broad trigger phrases for historical report retrieval can cause the agent to fetch sensitive report data when the user’s intent is ambiguous. In a health context, accidental retrieval of report history is more dangerous because it may expose private medical information or cause unintended cloud queries tied to user identity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that uploaded files are automatically saved locally, but it does not clearly warn users about local persistence, retention, or access controls. Because the inputs are face images/videos and health-related data, silent local storage increases privacy exposure and potential unauthorized access risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill requires cloud API queries for historical reports without clearly warning users that report data is retrieved from a remote service. This lack of transparency is problematic for health-related reports because users may not realize their data is being accessed or correlated by an external system.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation describes a pet health analysis API while the skill is presented as a stroke-risk screening tool for humans. This type of cross-domain mismatch is dangerous because it can cause the agent or integrators to invoke the wrong backend, mishandle medical data, or produce unsafe health guidance based on an unrelated service. In a medical-risk context, documentation confusion materially increases the chance of incorrect routing, privacy mistakes, and unsafe clinical outputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Nearly all user-facing strings, errors, help text, and reports are hard-coded in Chinese, and the tool provides no option for users to select a different language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
skills/smyx_common/scripts/config-dev.yaml:2