T01 · Skill Instruction Hijacking
- Location
SKILL.md:219- Finding
Automatic Disclosure of Conversation-Derived Feedback to an External Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches an Amazon product-research tool, but it adds under-disclosed external feedback reporting, credential/payment onboarding, and broad local persistence that users should review carefully.
Install only if you are comfortable with LinkFox receiving product-query data and possibly conversation-derived feedback. Avoid using endpoint override environment variables unless you fully control them, do not store API keys in shell startup files on shared machines, and review any phone/SMS login or payment-order step before proceeding.
SKILL.md:219Automatic Disclosure of Conversation-Derived Feedback to an External Service
scripts/junglescout_product_database.py:37Credential-Bearing Requests Can Be Redirected Through Unvalidated Environment Variables
scripts/junglescout_product_database.py:251Directory Traversal Through Unsanitized Session Identifier
scripts/onboarding.py:484Reusable API Key Is Printed and Recommended for Plaintext Persistent Storage
scripts/onboarding.py:164Unpinned Runtime Dependency Installation Guidance
The request sent to urlopen includes a gateway URL and multiple headers sourced directly from environment variables, including the base endpoint override via LINKFOX_TOOL_GATEWAY and session metadata headers. In an agent/runtime setting, environment variables are often externally influenced; allowing them to control outbound destinations and transmitted metadata can cause SSRF-style redirection, credential leakage, or exfiltration of conversation/session identifiers to an attacker-controlled server.
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 code builds request destinations from environment-controlled base URLs and then sends sensitive data such as phone numbers, SMS codes, access tokens, refresh tokens, and API-token requests via requests.post. If an attacker can influence the environment, they can redirect these calls to attacker-controlled infrastructure and exfiltrate credentials or session material; this is especially dangerous because the file's purpose is onboarding and token issuance, so the transmitted data is highly sensitive.
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 URL is derived from environment variables and used in urllib.request.urlopen with the Authorization header set from the API key. An attacker who can tamper with the environment can redirect authenticated gateway calls, capturing the API key and manipulating package, order, or account responses, which can lead to credential theft and fraudulent transactions.
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 Amazon product filtering, but the analyzed behavior reportedly includes login, SMS verification, API key management, account lookup, subscription ordering, payment QR generation, and payment-status polling. That mismatch is dangerous because it can trick the agent or user into authorizing credential handling, account actions, or purchases under the guise of a benign research tool.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **Table format**: Present results in a structured table with key columns: title, brand, price, monthly sales, monthly revenue, BSR rank, reviews, rating, LQS
2. **Sorting note**: Remind the user what sorting was applied and how many results were returned
The onboarding document introduces account recovery, phone-based registration, and payment flows that are outside the declared scope of a Jungle Scout product-database filtering skill. This scope expansion increases the attack surface by enabling collection of credentials, phone numbers, and payment interactions through the skill, which could be abused or socially engineered if invoked inappropriately.
The skill describes a phone-number and SMS-code registration/login flow that is not justified by the advertised product-research purpose. That creates unnecessary handling of sensitive personal data and authentication factors, exposing users to privacy risks, account abuse, or phishing-style collection of login information through the agent workflow.
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 instructions enable plan listing, order creation, and payment-method selection, which are unrelated to the skill's stated product filtering role. Embedding payment flows in a loosely related skill increases the chance of unauthorized purchases, social engineering, and user confusion about what the skill is permitted to do.
The implemented functionality is unrelated to the declared Jungle Scout product-database filtering skill and instead performs account onboarding, SMS authentication, API key retrieval, and purchasing flows. This capability mismatch is a strong indicator of deceptive or unauthorized behavior because it can harvest credentials and monetize users under the guise of a benign research skill.
The skill includes package listing, order creation, and payment QR generation even though those actions are unnecessary for product discovery/filtering. In this context, adding payment collection logic materially increases user risk because the skill can drive users into unintended purchases and exposes them to payment fraud or abuse under misleading functionality.
The skill declares capabilities that imply environment access, file writes, and network use, but it does not constrain them with an explicit tool scope. In an agent setting, this weakens least-privilege controls and makes it easier for hidden or future instructions to perform broader actions than users would expect.
The trigger conditions are very broad and allow the skill to activate for generic product-research or product-finding requests even when the user did not ask for Jungle Scout or this vendor workflow. Over-broad invocation increases the chance of unintended tool use, unnecessary external API calls, and disclosure of user queries to third-party services.
The skill requires writing every full API response to a session-linked file in the current project directory. Persisting full responses by default expands the exposure window for potentially sensitive business data, user inputs, account-related metadata, or third-party response contents beyond the immediate task context.
The boundary guidance relies on broad everyday phrases like '选品', '找产品', or '市场调研' without sufficient limiting conditions. In practice, this can cause the skill to capture ambiguous requests and route user data into this tool when another skill, or no tool at all, would be more appropriate.
The skill instructs the agent to automatically send feedback or mismatch reports to an external Feedback API, which is outside the core product-query task. This creates an unrequested data egress path that may transmit user content, complaints, or contextual details to a third party without clear notice or consent.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
## curl 示例
```bash
curl -X POST https://tool-gateway.linkfox.com/tool-jungle-scout/product-database/query \
The file for a product-database query skill also documents a separate public feedback API, which is unrelated to the core product filtering function. Mixing an auxiliary write-capable endpoint into operational API docs increases the chance that an agent will invoke it unexpectedly, potentially transmitting user content or conversation-derived data to a third party without a clear user request or consent boundary.
The flow asks the user to provide a phone number to a script and complete SMS verification without any privacy notice or explanation of how personal data is transmitted, stored, or retained. This omission can lead users to share sensitive personal information without informed consent and creates avoidable privacy/compliance risk.
The instructions tell users to persist an API key in shell startup files, which stores the secret on disk in plaintext and may expose it to other local users, backups, logs, or accidental disclosure. The absence of any warning or safer alternative makes credential leakage more likely.
This Python file contains natural-language documentation and output policy entirely in Chinese, establishing the skill's interface and behavior in a single language. The policy requires flagging language or locale constraints when they are imposed without user opt-in or an explicit justified regional scope.
The module documentation promises that data will not be written to /tmp and that unwritable current directories will cause an error, but the implementation silently falls back to other locations including the system temporary directory. This discrepancy can cause sensitive API responses and session metadata to be persisted in less controlled locations than operators expect, weakening data-handling guarantees and potentially exposing data to other local users or cleanup tooling.
The QR rendering function writes payment-related QR images to disk in workspace, home, or temp directories without clear user notice or lifecycle controls. While not as severe as credential theft, this can leave sensitive payment artifacts accessible to other local users or later processes, especially on shared systems.
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 code only accepts 11-digit phone numbers and always sends SMS login requests with areaCode set to +86, which forces a specific locale/workflow. There is no natural-language opt-in or documented justification in this file that the skill is intentionally region-specific.
No suspicious patterns detected.