Back to skill

Security audit

Temu美国站-商品管理

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent as a Temu product-management tool, but it combines powerful store-changing actions with weak credential handling, endpoint scoping, and local persistence safeguards.

Review this skill before installing. Use it only with accounts where product deletion, inventory edits, listing status changes, and compliance edits are acceptable; avoid setting gateway override environment variables; avoid storing or printing raw tokens; and require explicit human confirmation before any delete, stock, status, compliance, billing, or purchase-related command.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/_temu_common.py:14
Finding

Environment-Controlled Gateway Override Can Exfiltrate LinkFox and Temu Credentials

Content
View full analysis
dict: """调用 Temu 网关接口;必须先具备 LinkFox 用户 Token。""" linkfox_token = get_linkfox_token(linkfox_params) data = json.dumps(body, ensure_ascii=False).encode("utf-8") req = Request( url, data=data, headers=build_gateway_headers(linkfox_token), method="POST", ) try: with urlopen(req, timeout=timeout) as response: return json.loads(response.read().decode("utf-8")) ``` The proxy body containing the Temu credential is constructed as follows: ```python body = { "site": site, "managementType": management_type, "accessToken": resolve_access_token(params), "type": api_type, } biz = business if business is not None else extract_business_params(params) if biz: body["params"] = biz return body def us_proxy_call(params: dict, api_type: str, business=None, timeout: int = 150) -> dict: body = build_us_proxy_body(params, api_type, business) return call_temu_api(PROXY_URL, body, timeout=timeout, linkfox_params=params) ``` ### Technical Analysis The Skill declares `https://tool-gateway.linkfox.com` as its gateway, but three environment variables can replace that destination with an arbitrary URL. No scheme validation, hostname allowlist, port restriction, or explicit development-mode check is applied. A normal ...[truncated 1939 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/_temu_token_store.py:28
Finding

Temu Access Tokens Are Persisted in Plaintext Without Enforced Owner-Only Permissions

Content
View full analysis
str: return os.environ.get("TEMU_TOKEN_STORE_PATH", DEFAULT_STORE_PATH) ``` ```python def _save_store(data: dict) -> None: path = store_path() parent = os.path.dirname(path) if parent: os.makedirs(parent, exist_ok=True) with open(path, "w", encoding="utf-8") as f: json.dump(data, f, indent=2, ensure_ascii=False) f.write("\n") ``` ```python entry = { "site": site, "managementType": management_type, "tokenPurpose": token_purpose, "accessToken": access_token, "updatedAt": _utc_now(), } ``` ### Technical Analysis Temu access tokens are written directly into a plaintext JSON file. The implementation does not use an operating-system credential store, encryption, or explicit owner-only filesystem permissions. The resulting permissions depend on the process umask and any pre-existing file or directory permissions. If `TEMU_TOKEN_STORE_PATH` points to a shared or weakly protected location, exposure becomes more likely. The code also does not verify that the destination is owned by the current user, is a regular file, or is not a symbolic link. The local token store supports the Skill's functionality by avoiding repeated token entry, but plaintext persistence without permission enforcement exceeds the minimum security controls expected for credentials capable of destructive product operations. ### Attack Path 1. The user invokes `save_temu_access_token.py`. 2. `_save_store` creates or overwrites the configured JSON file using ordinary default permissions. 3. A local user, compromised process, backup agent, synchronization tool, or process with access to the user profile reads the file. 4. The att ...[truncated 905 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get_temu_access_token.py:49
Finding

Token Management Utilities Expose Complete Credentials Through Process Arguments and Standard Output

Content
View full analysis
= 2: try: params = json.loads(sys.argv[1]) mask = params.get("mask", True) except json.JSONDecodeError as e: print(f"Invalid parameter format: ...[truncated 1754 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/onboarding.md:11
Finding

Onboarding Documentation Encourages Persistent Plaintext API Key Storage in Shell Startup Files

Content
View full analysis
" echo 'export LINKFOX_AGENT_API_KEY=""' >> ~/.zshrc && source ~/.zshrc echo 'export LINKFOX_AGENT_API_KEY=""' >> ~/.bashrc && source ~/.bashrc ``` ### Technical Analysis The onboarding instructions recommend permanently embedding the LinkFox API key in shell startup configuration or the user's persistent environment. On macOS and Linux, the literal key is written to plaintext dotfiles. The command containing the key may also be saved in shell history. This is user-requested credential configuration rather than malicious persistence or a system backdoor. Nevertheless, it increases the number and lifetime of plaintext credential copies and exposes the key to dotfile synchronization, backups, accidental commits, local processes, and support bundles. ### Attack Path 1. A user completes onboarding and receives a LinkFox API key. 2. The user follows the supplied command, placing the literal key in shell history and a startup file or persistent environment. 3. The startup file is read by another local process, copied into a backup, synchronized to a dotfile repository, or accidentally shared. 4. An attacker extracts the key. 5. The attacker authenticates to LinkFox gateway functions as the affected user and may consume account resources or proxy requests. ### Impact Assessment The exposed credential authenticates the user to the LinkFox gateway. Depending on server-side authorization and associated account state, compromise may permit: - Unauthorized gateway use. - Consumption of credits or account quota. - Access to account-related API functions. - Proxying of requests when other required credentials are available. - Exposure of account metadata. This finding does not constitute `T06: System Persistence` becaus ...[truncated 112 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (87)

Tainted flow: 'url' from os.environ.get (line 235, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The POST target URL is derived from environment-controlled base URLs, and the function sends sensitive authentication material such as access tokens, UID headers, refresh tokens, phone numbers, and login codes to that destination. If an attacker can influence environment variables in the skill runtime, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or user data.

Content

Scanner excerpt · scripts/onboarding.py (reported line 196)May include surrounding context.

python
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 = ""

Tainted flow: 'req' from os.environ.get (line 244, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

Gateway requests are built from an environment-derived base URL and include the LINKFOX agent API key in the Authorization header. An attacker who can set or influence the environment can redirect the CLI to a malicious server and capture the API key or manipulate responses, leading to credential theft and unauthorized account actions.

Content

Scanner excerpt · scripts/onboarding.py (reported line 246)May include surrounding context.

python
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

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A generic file-download endpoint that handles arbitrary download URL input introduces SSRF-like and data-exposure concerns if not strictly constrained, even if described as signed file download. Because the skill otherwise focuses on product APIs, operators may not realize they are enabling a separate network-fetch primitive with different security assumptions.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/onboarding.md (reported line 14)May include surrounding context.

md
证码后:`python scripts/onboarding.py login <phone> <code>`(workbuddy 宿主加 `--channel workbuddy`)
   - 拿到 `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

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented endpoint temu.local.goods.delete clearly indicates deletion of goods, which is a destructive and potentially irreversible action. The surrounding markdown provides routing and documentation links but no explicit caution, confirmation expectation, or notice that using this capability can permanently remove product records.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This script retrieves a stored Temu access token and prints it in cleartext to stdout, making the credential trivially exposable through terminal history, logs, calling wrappers, CI output, or any upstream agent that invokes the script. In the context of a commerce-management skill that can edit, delete, publish/unpublish products, and manage inventory/compliance, exposing the token enables unauthorized API actions with potentially broad account impact.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements account onboarding, SMS login, API key retrieval, package listing, and ordering workflows that are outside the declared Temu US product-management scope. Scope expansion into identity and billing increases the attack surface and creates opportunities for credential harvesting, unauthorized purchases, and confused-deputy behavior when users invoke a product skill expecting only catalog operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code can create paid orders and generate payment QR codes even though the skill is described as a Temu product-management integration. Embedding billing functions in an unrelated skill can trick users or calling agents into initiating purchases they did not intend, and materially raises financial-risk exposure.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents capabilities that require network access, environment-variable access, and file writes, but it does not declare any explicit tool scope or allowed-tools policy. In an agent environment, this increases the blast radius because the runtime may permit broader capabilities than strictly necessary, including credential access and persistent local writes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill supports destructive operations such as product deletion, inventory edits, and listing-status changes without an explicit warning or confirmation requirement. In an agent workflow, this raises the risk of accidental irreversible business actions triggered by ambiguous prompts or automation errors.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

L023 明确写明“本工具会消耗积分”,并要求失败或空结果时不要自动连续试探以避免额外成本;但 L136 又写“ 不消耗积分”。这不是简单遗漏,而是同一文件内对工具成本与使用约束的直接矛盾,可能误导用户或代理做出错误的调用决策。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script catalog and examples normalize update/delete capabilities but do not pair them with cautionary guidance, validation, or confirmation steps. This makes unsafe invocation easier in high-automation contexts where agents may execute examples directly or infer that destructive actions are routine and safe.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation explicitly walks through live product-management operations such as full/partial updates, stock edits, and listing status changes, but does not warn that these actions can modify or remove production catalog data. In an agent skill context, this increases the chance of unintended destructive actions by users or downstream automation, especially when product IDs are discovered and then immediately used for update/delete/off-shelf workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file documents editing and deletion API operations, including temu.local.goods.delete, but provides no warning that these actions may modify or permanently remove product data. For markdown files, safety-affecting behaviors should be accompanied by clear user-facing warnings when they can impact user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file documents a request that sends fields such as goodsName, hdThumbUrl, and carouselImageList to the Temu gateway, which is a network operation involving user or system data. Under the markdown-specific warning rule, the description should explicitly warn that provided product metadata and URLs will be transmitted to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description states that the skill edits product compliance and qualification information, including documents, photos, responsible-person data, and governance attributes. For markdown files, safety-relevant behaviors that can affect user data or system integrity should be accompanied by warnings, but this document contains no caution that invoking the skill changes upstream product records.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.