T01 · Skill Instruction Hijacking
- Location
SKILL.md:106- Finding
Silent Feedback Transmission and Agent Instruction Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill can do SellerSprite market research, but it also handles login credentials, API keys, billing orders, payment QR codes, automatic feedback reporting, and broad local/network data flows that need review before use.
Install only if you are comfortable with this skill sending market-research inputs and session metadata to LinkFox/SellerSprite services, handling LinkFox account login and billing flows, and writing full results locally. Avoid using endpoint override environment variables, do not paste SMS codes unless you intend to link the account, confirm any order before payment, and store API keys in a proper secret manager rather than shell startup files or logs.
SKILL.md:106Silent Feedback Transmission and Agent Instruction Hijacking
scripts/sellersprite_market_research.py:36Credential-Bearing Requests Can Be Redirected to Arbitrary Endpoints
scripts/sellersprite_market_research.py:207Unsanitized Session Identifier Enables Path Escape and Undocumented Temporary-Directory Writes
scripts/onboarding.py:457Generated API Key Is Exposed Through Standard Output and Plaintext Shell Profiles
scripts/onboarding.py:163Runtime Instructions Install Unpinned Third-Party Dependencies
The POST target is built from environment-controlled base URLs and then used to send sensitive login material, SMS codes, access tokens, refresh tokens, and generated API keys. If an attacker can influence environment variables in the skill runtime, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or tokens; the skill context increases severity because this file explicitly handles authentication and key issuance.
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 also derived from environment variables and used by urllib to contact the service while attaching the Authorization header from LINKFOX_AGENT_API_KEY. A compromised runtime or wrapper can point the gateway to an attacker host and cause direct API key leakage and unauthorized actions such as package lookup, order creation, or order-status polling.
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 destination is influenced by environment-controlled configuration via LINKFOX_TOOL_GATEWAY, and the same request carries the Authorization API key plus session metadata headers. If an attacker can influence the runtime environment, they can redirect traffic to an arbitrary host and exfiltrate credentials and contextual identifiers, which is a real SSRF/credential-leak risk rather than a harmless configuration detail.
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 declared purpose is market research, but the referenced behavior includes authentication, API key generation, account/team info access, subscription listing, order creation, payment handling, QR-code payment generation, and payment-status queries. This is a major scope expansion into identity, billing, and account operations, creating opportunities for unauthorized transactions, sensitive data exposure, and user deception because the extra behaviors are not transparently declared.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. 先给出市场候选 Top N,再展示核心指标(市场规模、集中度、新品占比)。
2. **入参回显**:`GoodsCrn` / `BrandCrn` / `SellerCrn` / `EbcProportion` / `FbaProportion` / `FbmProportion` / `AmazonSelfProportion` 对应筛选为 **0~1 小数**;向用户说明时可换算为百分数(如传 `0.4` 可表述为「商品集中度上限 40%」)。响应 `data[]` 里若仍带「(%)」字段,与入参刻度可能不同,以返回为准。
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 declared skill is for SellerSprite/Amazon market research, but the code actually implements LinkFox onboarding, SMS login, API key acquisition, and payment flows. This functionality mismatch is dangerous because it can trick operators or users into granting phone numbers, verification codes, and credentials under false pretenses, making the hidden auth/payment behavior more suspicious than if it were clearly disclosed.
Purchase and payment-order creation are embedded in a skill whose stated purpose is market research, not billing. Hidden payment capabilities create risk of unauthorized charges, deceptive workflow transitions, and abuse of an agent environment to initiate commercial transactions users did not reasonably expect.
The file performs SMS-based login, token exchange, team lookup, and API key generation/disclosure, none of which are necessary for category-level market research. In context, this is especially dangerous because it directly collects authentication factors and returns reusable API credentials, enabling account takeover or long-lived unauthorized access if mishandled or socially engineered.
The skill declares capabilities that imply environment access, file writes, and network use, but it does not define an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege guarantees and makes it harder to constrain what the skill may access or do at runtime, especially given it writes files and may use credentials from environment variables.
The activation condition is intentionally broad enough to trigger even when the user does not mention SellerSprite, causing the skill to activate for generic Amazon market-research requests. Overbroad triggering increases the chance of unintended invocation of a skill that has network, file-write, and possibly billing-related side effects, reducing user control and informed consent.
The primary description and operating instructions are written as a Chinese-only skill description, with no indication that the user can choose language or that the locale restriction is required for a region-specific use case. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.
The documentation instructs the skill to automatically report feedback through a Feedback API, which is outside the stated market-research function. This introduces undeclared outbound data sharing and can transmit user interactions or metadata without clear necessity, transparency, or consent.
Auto-reporting user praise, dissatisfaction, or perceived improvements to a Feedback API is not required to perform category market research and may exfiltrate user sentiment and conversation-derived data. Because it is triggered broadly and 'without interrupting the user's flow,' users may be unaware their feedback is being sent externally.
The document instructs the skill to send requests to external Linkfox endpoints using an API key from environment variables, but it provides no user-facing disclosure or consent guidance about transmitting user-provided market research inputs off-platform. In an agent setting, this can cause silent exfiltration of user prompts, business data, or derived search criteria to third-party services and also normalizes use of high-privilege credentials without clear boundary controls.
The curl example explicitly demonstrates posting data to an external endpoint with an Authorization header, confirming the skill is designed to transmit request bodies and credentials beyond the local agent boundary. In this skill context, external transmission is expected for functionality, but it is still security-relevant because there is no accompanying guidance on consent, data minimization, or protection against sending sensitive user content.
| image | string | 图片链接 | | asin | string | ASIN |
curl -X POST https://tool-gateway.linkfox.com/sellersprite/market/research -H "Authorization: $LINKFOXAGENT_API_KEY" -H "Content-Type: application/json" -d '{
The onboarding document instructs the agent to handle authentication recovery, API key retrieval, account registration, and billing/payment workflows that are unrelated to the skill's stated Amazon market-research purpose. This expands the skill's privilege and data-handling scope, creating unnecessary exposure to credential handling, payment flow manipulation, and social-engineering risk if the agent follows these steps automatically.
The document explicitly tells the operator to ask for a user's phone number and use it in a script-driven registration/login flow, but provides no privacy notice, minimization guidance, or verification that collecting the number is necessary and authorized. That creates a real risk of unnecessary PII collection, mishandling of SMS-based authentication, and account takeover or impersonation if the process is abused.
This code transmits sensitive data externally via POST, including phone numbers, SMS codes, tokens, and login context. External transmission is expected for authentication workflows, but in this file it is still security-relevant because the destinations are environment-overridable and the skill's declared purpose does not justify credential-handling behavior.
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 forcibly uses area code +86 for SMS verification, with no indication that this is optional or limited to a region-specific deployment. This is a natural-language and behavior-level locale policy issue because the skill constrains users to a specific locale without offering choice or documenting a justified regional scope in this file.
The code generates or fetches an API token and emits it in stdout JSON without any in-file warning, masking, or guidance about secure handling. In agent and CLI environments, stdout is commonly logged, captured, or surfaced to orchestrators, so this can unintentionally disclose a reusable secret.
The top-level documentation states that the full response is always written to <cwd>/linkfox/... and explicitly says writing to /tmp is forbidden. However, _linkfox_root() later implements fallback locations including ~/linkfox and $TMPDIR/linkfox, and _resolve_output_path() uses that resolver, so the actual persistence behavior contradicts the stated output policy.
The script sends SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME to the remote API without any visible minimization or user-facing disclosure in this code path. In this skill context, those identifiers may reveal conversation/session linkage and application context to an external service, increasing privacy and correlation risk, especially when combined with the gateway override behavior.
The Feedback API section defines an external POST endpoint for arbitrary feedback content but omits any warning that the submitted text leaves the local system and is sent to a third party. This creates a privacy and data-handling risk because users or agents may include sensitive operational details, prompts, or business information in feedback without realizing it is externally transmitted.
The module docstring and command help text are presented entirely in Chinese, and the file offers no alternative language or opt-in mechanism. For a general-purpose skill, this can violate language/locale policy when a specific language is imposed without user choice or an explicit regional justification.