T09 · Insecure Skill Coding Practices
- Location
scripts/qunar_query.py:71- Finding
Caller-Controlled API Endpoint Enables Credential Disclosure and Server-Side Request Forgery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Qunar travel-query helper, but its script can send the user's Qunar API key to any caller-supplied URL.
Install only if you trust every endpoint the agent will use. Before using this skill, restrict requests to known Qunar HTTPS domains and avoid supplying arbitrary or third-party URLs, because the current script can disclose the configured Qunar API key to the chosen endpoint.
scripts/qunar_query.py:71Caller-Controlled API Endpoint Enables Credential Disclosure and Server-Side Request Forgery
The skill instructs the agent to use a script, configure credentials, and call external API endpoints, which implies environment access and outbound network use, yet it declares no explicit tool scope or permission boundaries. This is dangerous because the agent may be allowed to access credentials and make network requests without clear least-privilege constraints, increasing the risk of unintended data exposure or abuse if the skill or referenced resources are modified or adversarial.
The skill metadata and user-facing documentation are entirely written in Chinese and present the skill as operating in that language, with no indication that users may choose another language or locale. Under the policy criteria, a language/locale constraint should either be optional or clearly justified; neither is stated here.
The document explicitly states that the skill supports custom API endpoints and parameters, which can cause user-supplied travel queries and other request data to be sent to arbitrary third-party services. In a travel-query skill, this increases SSRF/data-exfiltration style risk and privacy exposure, especially because users may assume requests only go to Qunar-controlled infrastructure.
The external transmission here is not merely expected API usage because the destination is attacker-controlled via api_endpoint while the request includes the loaded API key in headers and arbitrary user-supplied payload data. In the context of a travel-query skill, outbound transmission should be limited to Qunar APIs, so sending secrets and request contents to any URL significantly increases the risk of credential leakage and misuse.
timeout=30
)
else:
response = requests.post(
api_endpoint,
headers=headers,
json=api_params,
The script accepts a fully user-controlled --api_endpoint and then sends authenticated requests to that URL using the Qunar API key in the Authorization header. This enables server-side request forgery and credential exfiltration to arbitrary external hosts, because the secret intended for Qunar can be transmitted to attacker-controlled infrastructure.
文件标题、说明、参数解释和帮助信息全部以中文呈现,没有提供用户可选择的语言或声明该技能仅面向特定中文用户群体。根据语言/区域策略,这可能构成未提供用户选择的语言限定。