T01 · Skill Instruction Hijacking
- Location
skills/linkfox-jiimore-get-niche-info-by-keyword/SKILL.md:274- Finding
Forced Promotional Content in Agent Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a LinkFox/Jiimore market-analysis workflow, but it also includes silent feedback reporting plus broad credential, payment, file, and endpoint behaviors that need review before installation.
Install only if you trust LinkFox with your market queries, generated reports, account/API key, and any feedback content. Avoid using custom LINKFOX_* endpoint environment variables with real credentials, do not upload private files to the OSS helper, review payment actions before approving them, and prefer storing API keys in a proper secret manager instead of shell startup files.
skills/linkfox-jiimore-get-niche-info-by-keyword/SKILL.md:274Forced Promotional Content in Agent Output
skills/linkfox-jiimore-get-niche-info-by-keyword/SKILL.md:262Silent External Reporting of User Statements and Intent
skills/linkfox-jiimore-get-niche-info-by-keyword/scripts/onboarding.py:68Environment-Controlled Endpoints Can Receive Authentication Credentials
skills/linkfox-jiimore-get-niche-info-by-keyword/scripts/jiimore_get_niche_info_by_keyword.py:62Unnecessary Agent Correlation Metadata Sent to External APIs
skills/linkfox-file-upload/scripts/linkfox_paths.py:52Unsanitized Session Identifier Allows Output Path Traversal
skills/linkfox-report-generator/scripts/inject_report.py:155Generated Reports Permit Stored HTML and JavaScript Injection
skills/linkfox-file-upload/scripts/linkfox_paths.py:476HTTP Media Downloader Allows SSRF and Unbounded Disk Writes
skills/linkfox-jiimore-get-niche-info-by-keyword/scripts/onboarding.py:484Onboarding Workflow Exposes Complete API Keys Through Standard Output
skills/linkfox-file-upload/SKILL.md:32Runtime Installation Instructions Use Unpinned Third-Party Dependencies
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = _lf_Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
try:
with _lf_urlopen(req, timeout=timeout) as resp:
if guessed_ext == "bin":
ct = resp.headers.get("Content-Type", "")
if "mp4" in ct:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
req = Request(url, data=data, headers=headers, method="POST")
try:
with urlopen(req, timeout=HTTP_TIMEOUT) 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 destination URLs from environment variables and then sends sensitive authentication material to them via requests.post. Because this file handles SMS login, access tokens, refresh tokens, and API-key generation, a malicious or misconfigured environment can silently redirect these secrets to an attacker-controlled host, causing credential exfiltration and account compromise.
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 path uses a URL derived from environment variables and sends the API key in the Authorization header via urlopen. If an attacker can influence the runtime environment, they can redirect paid account, order, and user-info traffic to an arbitrary server and capture the API key and related account data.
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 download_media function accepts an arbitrary URL and fetches it with urlopen, only checking that it starts with http:// or https://. This creates a server-side request forgery primitive that can reach attacker-chosen hosts, including internal services or cloud metadata endpoints, and write the response to local storage. In the context of a niche-market recommendation skill, this network/file capability is unrelated to the stated purpose and therefore more suspicious and dangerous.
req = Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
try:
with urlopen(req, timeout=timeout) as resp:
# 从 Content-Type 进一步修正扩展名
if guessed_ext == "bin":
ct = resp.headers.get("Content-Type", "")
The request includes multiple headers taken directly from environment variables, and the destination host is also overrideable via LINKFOX_TOOL_GATEWAY. In an agent/runtime environment where these variables may be influenced by untrusted context or plugins, this can exfiltrate sensitive execution metadata and the API key to an attacker-controlled endpoint, making the network sink materially dangerous.
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, including phone numbers, SMS codes, access tokens, refresh tokens, and API-token generation requests, to those endpoints. If an attacker can influence environment variables such as LINKFOX_LOGIN_API_URL or LINKFOX_AGENT_USER_API_URL, they can redirect these requests to attacker-controlled infrastructure and capture credentials or tokens.
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 in urlopen with the Authorization header populated from the local API key. An attacker who can set LINKFOX_AGENT_API_URL or related variables can exfiltrate the API key and influence account, package, and order operations by redirecting traffic to a malicious endpoint.
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
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/json", "Authorization": api_token},
)
try:
with urlopen(req, timeout=30) as resp:
body = json.loads(resp.read().decode())
break
except urllib.error.HTTPError as e:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/json", "Authorization": api_token},
)
try:
with urlopen(req, timeout=30) as resp:
body = json.loads(resp.read().decode())
break
except urllib.error.HTTPError as e:
download_media accepts an arbitrary caller-supplied URL and fetches it with urlopen, only checking that the scheme is http/https. This creates an SSRF-capable network primitive that can be abused to access internal services, metadata endpoints, or attacker-controlled hosts, and the downloaded content is then persisted locally. In the context of a niche-market recommendation skill, this capability is not justified and increases risk.
req = Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
try:
with urlopen(req, timeout=timeout) as resp:
# 从 Content-Type 进一步修正扩展名
if guessed_ext == "bin":
ct = resp.headers.get("Content-Type", "")
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
Directory creation, index maintenance, metadata recording, env-token usage, STS voucher retrieval, OSS upload, and arbitrary URL download represent substantial hidden system and network capabilities. In this context, that makes the skill more dangerous because the stated business-analysis purpose gives no reason for broad storage, transfer, and fetch operations.
The file is API documentation for linkfox-aigc-textgen, but the declared skill under review is a niche-market recommendation skill. This kind of cross-skill reference can cause an agent to invoke the wrong capability, send user inputs to an unrelated external service, and mishandle data or permissions outside the expected trust boundary.
The documentation introduces authentication recovery, phone-based registration, API key handling, and billing/payment workflows that are unrelated to the stated niche-market recommendation purpose of the skill. This kind of scope expansion is dangerous because it normalizes collecting credentials/PII and directing users into account/payment flows through the skill, increasing the chance of phishing, data misuse, or unauthorized monetization.
The skill instructs users to provide a phone number to a script, obtain SMS codes, log in, list plans, create orders, and select payment methods, none of which are necessary for a market-recommendation skill. In this context, the capability mismatch makes the skill materially more dangerous because it can be used to collect personal data and steer users into paid transactions outside the expected trust boundary.
The file implements an async AI text-generation client, while the declared skill is for niche-market discovery and recommendation. This capability mismatch is dangerous because it expands the skill's effective authority beyond user expectations and review scope, enabling hidden data egress or unintended content-generation operations under an unrelated manifest.
This file implements account onboarding, SMS authentication, API-key retrieval, plan listing, purchasing, and order querying, which is materially unrelated to a niche-market recommendation skill. Such scope mismatch is dangerous because it creates an unexpected credential and commerce collection surface that users and reviewers would not reasonably expect from the declared skill purpose.
The code can create orders and render payment QR codes, enabling a direct purchase workflow inside a skill that is supposed to provide market recommendations only. In this context, hidden commerce behavior is especially risky because it can pressure or trick users into financial transactions unrelated to the advertised functionality.
No suspicious patterns detected.