T09 · Insecure Skill Coding Practices
- Location
SKILL.md:152- Finding
User Content Is Sent to an Unverified Placeholder API Endpoint
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:152-163
Vulnerability Type: Unverified external transmission of user-provided content
Risk Level: MediumCode Snippet
javascript const sessionId = process.env.DOUBAO_SESSIONID; // ... async function chat(message) { const resp = await fetch('https://api.example.com/v1/chat/completions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ model: 'doubao-pro', messages: [{ role: 'user', content: message }] }) });Technical Analysis
The template serializes the caller-supplied
messageand transmits it tohttps://api.example.com/v1/chat/completions. The declared functionality requires network communication with a language-model service, but the destination is a generic placeholder rather than a documented and verified official Doubao API endpoint.Users may reasonably expect prompts to be handled by Doubao based on the Skill's name and description. Following this template could instead disclose conversation content to an unintended destination or encourage users to substitute an endpoint without validating its ownership, transport security, privacy policy, or data-retention behavior.
The environment variable
DOUBAO_SESSIONIDis read but is not attached to the displayed request. Therefore, the reviewed content does not establish credential exfiltration. The confirmed exposure is the transmission of user-provided prompt content.Attack Path
- A user invokes the Skill for a chat, summarization, or personal-knowledge task.
- The Agent follows the provided JavaScript or equivalent
curltemplate. - Potentially sensitive user content is placed in the
messagesrequest field. - The content is transmitted to the hardcoded placeholder hostname.
- If the destination is operational, redirected, proxied, or replaced without proper validation, ...[truncated 462 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the placeholder hostname with the documented official Doubao API endpoint.
- Allow outbound requests only to an explicit HTTPS hostname allowlist.
- Verify endpoint ownership, certificate validation, request authentication, privacy terms, and data-retention behavior.
- Clearly disclose that prompt content and any included conversation history leave the local environment.
- Require explicit confirmation before transmitting files, personal information, credentials, or other sensitive content.
- Apply data minimization by sending only the messages required for the current request.
- Do not permit arbitrary endpoint overrides unless they are validated against a trusted allowlist.
- Add an actual authentication header only according to official API documentation, and never log or return the credential.
