T01 · Skill Instruction Hijacking
- Location
SKILL.md:135- Finding
Automatic External Feedback Reporting Without Explicit User Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Ozon product lookup skill performs the advertised lookup, but it also has automatic feedback reporting, broad credential and billing flows, and unsafe local/environment handling that users should review before installing.
Review this before installing. Use only in an environment where you trust LinkFox endpoints and can control LINKFOX_* environment variables. Do not provide SMS codes or create payment orders unless you intentionally want the LinkFox account/billing flow, avoid storing API keys in shell profiles, and inspect or clean the local linkfox output/cache directories after use. Automatic feedback reporting should be disabled or made opt-in before handling sensitive product research or account details.
SKILL.md:135Automatic External Feedback Reporting Without Explicit User Consent
scripts/seerfar_ozon_product_detail_search.py:62Unnecessary Session and Execution Metadata Transmitted with Product Queries
scripts/onboarding.py:68Environment-Controlled API Origins Can Redirect Credentials and Personal Data
scripts/seerfar_ozon_product_detail_search.py:251Path Traversal Through Unsanitized SESSION_ID
scripts/onboarding.py:478API Credential Exposed Through Standard Output and Plaintext Shell Profiles
scripts/onboarding.py:31Unpinned Runtime Dependencies and Unsafe Installation Guidance
scripts/seerfar_ozon_product_detail_search.py:114Sensitive Responses and Payment QR Data Persisted with Default Filesystem Permissions
The POST target URL is derived from environment-controlled base URLs, and the function sends sensitive authentication material such as access tokens, refresh tokens, API keys, phone numbers, and SMS codes to that destination. If an attacker can influence environment variables or deployment configuration, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or intercept login and payment-related flows.
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 request URL is also built from environment-controlled base configuration and is used with an Authorization header containing the agent API key. A malicious or compromised runtime can redirect the gateway call to an attacker server, causing credential leakage and unauthorized account, billing, or order actions.
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 request headers and destination are influenced by environment variables, including LINKFOX_TOOL_GATEWAY and multiple metadata headers, and the script sends them directly over the network with an API key. In an agent/runtime context, environment variables are often attacker-influenced or cross-skill influenced, so this can exfiltrate credentials and session metadata to an arbitrary endpoint if the gateway variable is overridden.
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 claims strict output and storage behavior, but the analyzed behavior includes undeclared local persistence, caching in additional locations, possible fallback to home/temp directories, and forwarding arbitrary JSON rather than enforcing SKU-only parameters. This mismatch creates confidentiality and integrity risks because sensitive API responses may be stored in unexpected places and the backend may receive unintended parameters.
The skill claims strict output and storage behavior, but the analyzed behavior includes undeclared local persistence, caching in additional locations, possible fallback to home/temp directories, and forwarding arbitrary JSON rather than enforcing SKU-only parameters. This mismatch creates confidentiality and integrity risks because sensitive API responses may be stored in unexpected places and the backend may receive unintended parameters.
The trigger condition is intentionally broad enough to activate for general Ozon product-detail intent even when the user does not name this skill. Overbroad routing can cause unnecessary invocation of a paid, networked, data-persisting skill and increases the chance that user requests are sent to a third-party service without sufficiently specific intent.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
3. **Read aggregates, then trend**: start with top-level `totalSales` / `dailySales` / `totalRevenue` / `stock` / `categoryRanks` for a snapshot, then drill into `salesTrendVOList` for the daily series.
4. **One SKU per call**: this endpoint takes a single `sku`; to compare products, call once per SKU.
## Display Rules
1. **Present data only**: show the product metrics in a clear layout without subjective advice.
2. **Lead with identity + snapshot**: `title`, `sku`, `price` (₽), `reviewRating` (`reviewCount` reviews, `questionsAndAnswers` Q&A), then the sales snapshot (`totalSales`, `dailySales`, `totalRevenue`, `stock`) and the window (`startDate`–`endDate`).
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
This file implements account onboarding, SMS login, API-key issuance, package listing, purchasing, and order querying, none of which are necessary for an Ozon product-detail lookup skill. That mismatch is dangerous because it introduces credential collection and monetization capabilities unrelated to the declared skill purpose, strongly suggesting covert expansion of privileges and data access.
The ability to create payable orders and render payment QR codes is unrelated to product-detail analysis and can directly trigger financial transactions. In the context of a search/analysis skill, this creates unjustified billing capability and materially increases the risk of unauthorized purchases, social engineering, or hidden monetization flows.
This code performs SMS-based login and retrieves or generates API tokens, enabling the skill to collect user phone numbers and verification codes and then mint reusable credentials. In a skill advertised as Ozon product-detail search, that is a severe overreach that can lead to account takeover, persistent unauthorized access, and downstream abuse of the user's LinkFox environment.
The documentation explicitly says writing to /tmp is forbidden and non-writable current directories should cause an error, but the implementation silently falls back to home and temporary directories. This mismatch is dangerous because operators and calling agents may rely on the documented storage boundary, while data may actually be written to broader or less protected locations, including temporary storage.
The skill declares no explicit tool/permission scope even though it uses environment access, file writes, and network capabilities. Without a least-privilege declaration, the runtime may grant broader powers than users or reviewers expect, increasing the chance of unintended data access, persistence, or exfiltration.
The API reference instructs callers to send an Authorization header and optional user identifiers (uId, memberId) to an external service but provides no privacy, minimization, or handling guidance. This creates a real data-protection risk because agents may forward identifiers and secrets without informing users, validating necessity, or constraining downstream use.
This documentation explicitly demonstrates posting data and an API credential to an external gateway, which is an actual external-transmission behavior rather than a false positive. In this skill's context, external calls are expected for functionality, but the lack of accompanying safeguards, scope restrictions, and disclosure makes the transmission more dangerous than a normal example alone.
}
## curl 示例
```bash
curl -X POST https://tool-gateway.linkfox.com/seerfar/ozon/productDetailSearch \
The Feedback API sends free-form content to a separate endpoint, but the documentation does not warn that arbitrary user text may be transmitted externally. Because feedback content can easily include sensitive user data, prompts, business context, or secrets, omission of this warning increases the chance of unintended exfiltration.
The onboarding flow instructs operators to collect and process a user's phone number and SMS verification code through a local script, but it provides no privacy notice, consent language, retention limits, or guidance on secure handling of that personal data. This creates a real privacy and security risk because users may disclose sensitive identifiers and one-time codes without understanding how they are stored, transmitted, or protected.
This code file contains user-facing natural-language help and description text only in Chinese, including the module docstring and command descriptions. Under the language/locale policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a policy violation.
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 module docstring presents usage and output behavior entirely in Chinese, indicating the skill is designed to communicate in a fixed language. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified, which is not present here.
The comment claims small responses are printed directly without file persistence, but the implementation always writes the full response to disk first. This creates undeclared data retention and can surprise users or orchestrators that expect ephemeral handling for small outputs, leading to unintended storage of potentially sensitive commercial data.
The script persistently stores full API responses, cache entries, and session metadata on local disk, even though the skill is described as a read/query tool for product-detail lookup. In agent environments, local persistence can retain sensitive business data, identifiers, and activity history beyond user intent, increasing exposure to other processes, users, or later tasks.
The output-path docstring claims results are stored under /linkfox, but the code may redirect storage to ACPX_WORKSPACES, the home directory, or the temp directory. This discrepancy weakens operator assumptions about where data resides and can cause accidental exposure through less monitored or shared filesystem locations.
The document's operational instructions are presented only in Chinese, which can amount to forcing a specific language without user opt-in. The policy allows locale constraints when they are explicitly justified or optional, but no such choice or justification is provided here.