T01 · Skill Instruction Hijacking
- Location
SKILL.md:33- Finding
Mandatory Promotional Link Injection Hijacks Agent Responses
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent Meituan shopping-guide purpose, but it asks for account access and makes persistent local/global changes with several under-disclosed security risks.
Review this skill before installing. It is not clearly malicious, but it can authenticate to Meituan, bind and store account-linked media codes, show promotional links, perform background update checks, and modify the global npm environment. Install only if you trust the publisher and are comfortable with those local persistence and dependency-install behaviors.
SKILL.md:33Mandatory Promotional Link Injection Hijacks Agent Responses
scripts/qrcode.sh:53Unpinned Global NPM Package Installation During QR Generation
scripts/bind.py:334User Token and Media Code Exposed Through Process Arguments
scripts/bind.py:39Binding Response Bodies May Be Logged in Plaintext Under a Shared Temporary Path
The skill mandates activation for a very broad set of common consumer requests, including vague phrases like recommendations or everyday food/drug/shopping intents. Overly broad triggering can cause unnecessary collection and processing of user requests, force users into an auth/binding flow unrelated to their actual intent, and increase the chance that external links or background commands are invoked when not strictly needed. In this skill, that risk is amplified because activation can lead to local script execution, token handling, and external service interaction.
The skill description and all required user-facing scripts are written as mandatory Chinese responses, including exact phrases the user must provide such as “同意”. There is no indication that the user may choose another language or that the Chinese-only constraint is an explicitly documented regional requirement.
The skill includes diagnostic commands that read local auth and binding logs and then instruct the agent to surface findings back to the user. Even if intended for troubleshooting, this expands the skill from venue recommendation into local security-state inspection, increasing the chance that sensitive authentication metadata or behavioral traces are exposed in chat or to an untrusted user. The skill itself warns that logs may contain token-related fields, which confirms the sensitivity.
The section header and constraints describe version checking as a silent, non-blocking background step, yet the output rules explicitly tell the skill to append a visible update prompt with links when a new version exists. This is an active contradiction between the declared intent of the feature and its actual instructed behavior.
The skill performs external network requests to GitHub for version checks, which constitutes outbound transmission beyond the core recommendation flow. Although the request appears limited to release metadata, it still discloses that the skill is installed and may reveal user environment characteristics via network metadata, especially because the logic uses reachability to infer whether the user is on an internal or external network. Hidden background transmission is more concerning because it occurs silently and is not clearly consented to in the user-facing flow.
请求 `https://skills.sankuai.com/api/v1/skills?id=59498`,有响应且返回版本信息 → 记为 `platform=friday`,提取远端版本号
2. **降级外网 GitHub**(内网不可达时,说明是外部用户):
请求 `https://api.github.com/repos/Meituan-Union/Meituan-Union-Smart-Recommendation-Skill/releases/latest`,取 `.tag_name` 作为远端版本号 → 记为 `platform=github`
3. 两者均失败 → 静默跳过,不向用户输出任何内容
The reset section instructs users to run state-clearing commands that delete authentication, device, and binding state without any explicit warning, confirmation step, or backup guidance. This can cause avoidable loss of local access state and service disruption, especially if users follow the procedure during troubleshooting without understanding that it is destructive.
The trigger examples include very broad, everyday phrases such as asking for food delivery or nearby dining, which can overlap with ordinary user conversation and cause unintended invocation of the skill. In this context, accidental activation is more concerning because the skill initiates account-binding and recommendation flows tied to a Meituan account and media-issued binding code, increasing the chance of confusing or unwanted account-linked actions.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"""
cli_cleared = False
try:
result = subprocess.run(
["pt-passport", "logout", "--client_id", CLIENT_ID],
capture_output=True, text=True, timeout=10,
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 同时清除 pt-passport CLI 缓存
try:
subprocess.run(
["pt-passport", "logout", "--client_id", CLIENT_ID],
capture_output=True, text=True, timeout=10,
)
This code file contains natural-language documentation and CLI help/messages entirely in Chinese, describing the tool's purpose and usage without any indication that language selection is optional. The policy explicitly requires flagging language or locale constraints when the skill forces a specific language without user opt-in.
The script reads device token material from the user's auth token store in order to derive a decryption key for authentication logs, but it provides no warning, consent prompt, or disclosure that sensitive credential material is being accessed. In a diagnostic tool this may be expected behavior, but silently accessing authentication secrets increases the risk of inadvertent exposure, misuse in shared environments, and operator misunderstanding about what the tool touches.
The script decrypts authentication logs and prints the plaintext directly to stdout, including any embedded tokens, login details, or authorization data, without an explicit warning or redaction step. This is dangerous because stdout is often captured by terminals, shell history workflows, CI logs, remote sessions, screen recordings, or support transcripts, turning a local diagnostic action into a broader credential exposure event.
This code accesses a device token from a user auth file and uses it to decrypt binding logs, then later prints the decrypted contents to stdout. Although the script's purpose is diagnostic, there is no explicit warning that running it may reveal sensitive account or operational data in the terminal.
This script automatically sources a user-controlled nvm initialization file and performs a global npm installation from a local tarball without any warning, prompt, or trust verification. In an agent skill context, that behavior can silently modify the host environment, execute install-time package scripts as the current user, and persist changes beyond the skill run, which makes unintended or malicious package execution more dangerous.
The script presents itself as a QR generator but also performs a global npm installation of the qrcode package if missing. That hidden side effect expands its privileges and changes the host environment, creating supply-chain and integrity risk that is not justified by a simple rendering helper.
Auto-installing a global npm package gives the script the ability to modify the system and pull executable code from the package ecosystem at runtime. If the package, its dependencies, registry path, or network environment are compromised, this can lead to arbitrary code execution during installation or later use.
The script installs a global package automatically without explicit consent, warning, or an opt-in flag. In an agent or automation context, this is dangerous because it can silently alter shared environments and trigger execution of untrusted install scripts.
The skill documentation forces a single language presentation for all instructions and troubleshooting guidance. Under the stated policy, a language constraint should either be optional for the user or explicitly documented as a justified region-specific requirement.
The entire skill terms document is presented only in Chinese and does not offer an opt-in language or locale choice. Under the policy, forcing a specific language without user choice can be a natural-language policy violation unless the locale restriction is clearly documented and justified.
The module stores a persistent device_token in a user-controlled path selected by the XIAOMEI_AUTH_FILE environment variable and also writes authentication activity to a temp-directory log protected only by reversible XOR obfuscation derived from ai_scene and optionally the device_token. This expands the local attack surface around authentication state, can leak tracking or auth-related metadata to other local actors depending on filesystem permissions, and creates security assumptions inconsistent with the docstring's implication that token handling is delegated to pt-passport.
The docstring and all CLI output strings are written in Chinese, which imposes a fixed language on users. The file does not provide an opt-in language selection or explain that the tool is intentionally limited to a Chinese-speaking environment.
The script contains natural-language comments and stderr output in Chinese, including the installation notice, without offering any language choice or documenting a locale-specific scope. This can violate a language/locale policy when skills are expected to be language-neutral or user-selectable.
The stderr message announcing automatic installation is written only in Chinese, which imposes a specific language on users without opt-in. For shared skills, user-facing operational messages should either match documented locale scope or support user choice.
Detected: suspicious.secret_argv_exposure