T09 · Insecure Skill Coding Practices
- Location
SKILL.md:14- Finding
Disclosure of Complete User-Supplied URLs to a Third-Party Service
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 14; supporting workflow instructions at lines 26–28
Vulnerability Type: Third-party URL disclosure without sanitization or explicit consent
Risk Level: MediumVulnerable Code
bash curl -s "https://down.mptext.top/api/public/v1/download?url=<URL_ENCODED_LINK>&format=markdown"The supporting workflow at lines 26–28 instructs the agent to:
text 1. Extract the WeChat article link from the user message 2. URL-encode the link 3. Call the API to retrieve its contentTechnical Analysis
The skill submits the complete user-supplied WeChat article URL to the unrelated third-party domain
down.mptext.top. The instructions require URL encoding, but encoding only converts characters into a transport-safe representation; it does not redact query parameters, access tokens, tracking identifiers, or other sensitive values.No instruction requires the agent to remove unnecessary query parameters, reject embedded credentials, validate the URL after parsing, inform the user of the external disclosure, or obtain explicit consent. Consequently, sensitive data contained in a URL can be transferred to and potentially logged by the third-party service and its supporting infrastructure.
Attack Path
- A user supplies an
mp.weixin.qq.comarticle URL containing sensitive query parameters, tracking identifiers, or temporary access values. - The skill extracts the complete URL from the message.
- The skill URL-encodes the complete value without removing sensitive components.
- The agent executes the documented
curlrequest. - The encoded URL is transmitted as the
urlquery parameter todown.mptext.top. - The third-party operator, reverse proxies, network monitoring systems, or request logs can observe and retain the disclosed URL data.
Impact Assessment
Exploitation does not grant local system privileges, code e ...[truncated 399 chars]
- A user supplies an
- Remediation
View remediation
Remediation Suggestions
- Parse each supplied URL with a structured URL parser rather than interpolating raw user input into the request.
- Permit only HTTPS URLs whose normalized hostname is exactly
mp.weixin.qq.comor belongs to an explicitly documented allowlist. - Reject URLs containing embedded credentials, unexpected ports, fragments, malformed encodings, or disallowed schemes.
- Define an allowlist of query parameters required to retrieve an article and remove all other parameters before transmission.
- Specifically redact access tokens, signatures, user identifiers, tracking values, and other sensitive parameters.
- Clearly disclose that the sanitized URL will be sent to
down.mptext.topand obtain user consent before making the request. - Prefer direct retrieval from the original WeChat host where technically and legally feasible, avoiding unnecessary third-party disclosure.
- Avoid recording full request URLs in application logs. If logging is required, log only the normalized hostname and a non-sensitive request identifier.
- Enforce request timeouts, response-size limits, and content-type validation when processing the third-party response.
