T01 · Skill Instruction Hijacking
- Location
SKILL.md:119- Finding
Silent Transmission of Conversation-Derived Feedback to a Separate Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This image-analysis skill includes sensitive account, billing, feedback-reporting, credential-handling, and local-persistence behavior that users should review carefully before installing.
Install only if you are comfortable sending product data and prompts to LinkFox, using LinkFox account credentials with this skill, and potentially creating payment orders through its onboarding helper. Avoid using it with confidential catalog data unless you accept the local response caching and external feedback behavior, and do not store API keys in shell startup files on shared or logged systems.
SKILL.md:119Silent Transmission of Conversation-Derived Feedback to a Separate Service
scripts/multimodal_extract_attributes.py:37Environment-Controlled Endpoints Can Receive API Keys, Login Tokens, and User Data
scripts/onboarding.py:478Generated API Keys Are Printed to Standard Output and Recommended for Plaintext Shell Storage
scripts/multimodal_extract_attributes.py:250Unsanitized Session Identifier Enables Output-Path Traversal
scripts/multimodal_extract_attributes.py:102Complete Analysis Responses and Caches Are Persisted Without Explicit Restrictive Permissions
scripts/onboarding.py:164Runtime Guidance Recommends Installing Unpinned Third-Party Dependencies
The request sent via urlopen includes multiple environment-derived values in headers, and the destination host is also overridable via LINKFOX_TOOL_GATEWAY. That means a caller or compromised environment can redirect requests to an attacker-controlled endpoint and exfiltrate the API key plus session/message identifiers, which is a real secret-leak and data-egress risk.
method="POST",
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
The skill is advertised as a multimodal product-image attribute extractor, but the file implements account onboarding, SMS verification, API-key retrieval, package browsing, order creation, and payment QR generation. This severe capability mismatch is dangerous because it can socially engineer users or operators into executing credential and billing workflows unrelated to the declared purpose, increasing the chance of unauthorized account access, secret collection, and unwanted charges.
The code builds request destinations from environment-controlled base URLs and then sends sensitive authentication material, including SMS login data, bearer tokens, and generated API tokens, to those endpoints. If an attacker can influence environment variables in the skill runtime, they can redirect traffic to attacker-controlled servers and exfiltrate credentials or user data; in this skill, that risk is amplified because the code handles account login and key issuance rather than ordinary image-analysis traffic.
except RuntimeError as e:
return {"_error": str(e)}
try:
r = requests.post(url, json=body or {}, headers=headers, timeout=timeout)
return r.json()
except Exception as e:
body_text = ""
The gateway client composes URLs from environment-derived base addresses and transmits the API key in the Authorization header via urlopen. An attacker who controls the environment can redirect these requests to a malicious endpoint and capture the API key, user/account metadata, or order-related data, making this a practical credential-exfiltration vector.
headers["Content-Type"] = "application/json"
req = Request(url, method=method, data=body_bytes, headers=headers)
try:
with urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode())
except urllib.error.HTTPError as e:
status = e.code
The declared purpose is image attribute extraction, but the behavior reportedly includes account login, API key generation, account/team data access, package listing, payment order creation, QR code generation, and payment-status checks. This is a major description-behavior mismatch that can mislead operators and users into approving a skill that performs authentication, billing, and account-management actions outside its stated scope.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
- **columns**: Column definitions for rendering the result table.
- **costToken**: Total tokens consumed by the multimodal AI model.
## Display Rules
1. **Present data in tables**: Show extracted attributes in clear, well-formatted tables with product identifiers (ASIN, title) alongside the extracted attribute values.
2. **Highlight distribution**: When attribute groups are returned, summarize the distribution (e.g., "60% of products are red, 25% blue, 15% green") to give the user a quick overview.
The onboarding document adds account recovery, phone-based registration, and billing/payment flows that are outside the declared scope of an image-attribute extraction skill. This expands the skill's effective privileges into credential handling and payment orchestration, increasing the chance of data collection abuse, social engineering, and unauthorized account actions if the agent follows the documentation automatically.
Documenting a flow to send SMS codes, log in users by phone, and retrieve API keys is not justified by the skill's stated purpose and introduces direct credential and identity-handling behavior. In the context of a product-image analysis skill, this is especially risky because users would not reasonably expect the skill to request phone numbers, verification codes, or perform account registration on their behalf.
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
示 JSON 里的 phone/agreements
- 收到验证码后:`python scripts/onboarding.py login <phone> <code>`
- 拿到 `api_key` 后把下面三平台配置转发给用户,提示重启会话生效:
- Windows PowerShell(永久):`setx LINKFOX_AGENT_API_KEY "<key>"`
- macOS zsh:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.zshrc && source ~/.zshrc`
- Linux bash:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.bashrc && source ~/.bashrc`
- 变量名 `LINKFOX_AGENT_API_KEY`(主推)或 `LINKFOXAGENT_API_KEY`(老规范)任一即可
**billing 场景**:`errcode=402` 或消息含 `算力/余额/quota/insufficient/充值/套餐到期`。
- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单,否则输出编号清单让用户选
- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`(通常 `wechat/alipay`)
- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG
The billing section enables plan listing, payment-method selection, order creation, and payment status checks, which are unrelated to image feature extraction. Embedding payment workflow logic inside an image-analysis skill creates an unjustified financial-action surface that could be abused to manipulate users into purchases or trigger unintended transactions.
Billing and payment-order creation are unrelated to extracting visual attributes from product images and materially expand the blast radius of the skill. In context, this enables a supposedly image-focused skill to initiate purchases and render payment QR codes, which could be abused for unauthorized spending or deceptive monetization flows.
The code performs SMS-based authentication and returns an API key to the caller, even though the declared skill function is visual attribute extraction. In this context, that is especially dangerous because it turns an innocuous-seeming image skill into a credential-acquisition mechanism capable of obtaining long-lived access for user accounts or team spaces.
The skill appears to use environment variables, network access, and file writes but does not declare any explicit tool scope or permission boundaries. This weakens least-privilege controls and makes it harder for reviewers or runtime policy to prevent unintended access to local files, credentials, or external services.
The activation criteria are broad enough to trigger on many generic image-analysis requests, including cases where the user did not explicitly ask for this specific external skill. Overbroad triggering can cause unintended data transfer to the tool, unnecessary cost consumption, and execution in contexts where users expected a narrower or local-only response.
The skill instructs always writing complete API responses into a session-linked file under the current project directory, potentially storing product data, image-derived attributes, identifiers, and other sensitive business information beyond the immediate interaction. Persistent local storage in the workspace increases the chance of later unintended access, inclusion in commits, cross-task leakage, or exposure to other tools and users on the same environment.
The API reference explicitly instructs sending userInput, refResultData, image URLs, and product metadata to an external service, but it provides no privacy notice, data minimization guidance, or warning that user-supplied content will leave the local agent context. In a multimodal product-analysis skill, this increases the risk of unintentionally transmitting sensitive business data, proprietary catalog data, or personal data embedded in prompts or images to third-party infrastructure.
The curl example demonstrates sending product image analysis prompts and embedded product/image data to an external endpoint, confirming real external transmission behavior. In this skill context, that is expected functionality, but it remains security-relevant because the example normalizes exporting potentially sensitive catalog, image, and user-provided context without any accompanying trust-boundary warning or sanitization guidance.
}
## curl 示例
```bash
curl -X POST https://tool-gateway.linkfox.com/multimodal/extractPromptsFromMainImage \
The instructions tell users to persist API keys in shell startup files and immediately source them, but provide no warning about local credential exposure, shell history leakage, shared-account risks, or safer secret-management alternatives. While common in developer docs, presenting this casually inside an unrelated skill increases the chance that sensitive keys are copied into insecure environments or mishandled by the agent/user.
The script always writes the full API response to disk, regardless of size, without any runtime warning or consent flow. Because the response may contain extracted attributes, prompts, identifiers, errors, or other sensitive business data, unconditional persistence increases the chance of accidental exposure on shared systems or in project directories.
The docstring explicitly claims the script will not write to /tmp and will error if the current directory is not writable, but the implementation silently falls back to home and temporary directories. This mismatch is security-relevant because users and reviewers may rely on the documented storage behavior when handling sensitive API responses, leading to unintended persistence in less trusted locations.
This image-analysis skill also implements caching and persistent local data/session tracking that are not necessary for the narrowly described function. That broader behavior increases data retention and local exposure of potentially sensitive responses, especially when users expect transient analysis only.
The code writes full responses, metadata, index files, and session-organized artifacts across multiple local locations, which materially expands the skill’s capability beyond simple image attribute extraction. If the API output contains sensitive product, customer, or proprietary prompt data, this persistence creates avoidable local disclosure and forensic residue.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
except RuntimeError as e:
return {"_error": str(e)}
try:
r = requests.post(url, json=body or {}, headers=headers, timeout=timeout)
return r.json()
except Exception as e:
body_text = ""
The login command emits the user's API key directly to stdout JSON, which is commonly captured by logs, orchestration layers, transcripts, or downstream tools. Because the key grants API access, exposing it in normal command output creates a straightforward secret-leak path, especially risky in agent/skill environments where outputs are frequently persisted.
Examples like "Analyze the product images" and "Look at the main photos" are broad enough to match many ordinary requests, while the document does not clearly distinguish when this skill should be chosen instead of other image-analysis skills. This increases the risk of accidental or overly aggressive routing.
No suspicious patterns detected.