T09 · Insecure Skill Coding Practices
- Location
src/index.ts:247- Finding
Unrestricted MCP Endpoint Configuration Permits Sensitive Data Exfiltration
- Content
View full analysis
= {}, logger?: Logger ): Promise> { const baseUrl = getServiceUrl(service); const url = `${baseUrl}/${tool}`; const makeRequest = async () => { logger?.debug(`${service}.${tool}`, params); const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(params) }); const data = (await response.json()) as any; ``` ### Technical Analysis The Skill obtains each MCP destination from an environment variable and uses it directly as the base of an outbound `fetch` request. It does not parse or validate the URL before use. In particular, it does not: - Require HTTPS. - Restrict the hostname to the documented WeCom API host, `qyapi.weixin.qq.com`. - Reject embedded URL credentials. - Reject unexpected ports. - Validate that the configured path belongs to the expected WeCom MCP service. - Prevent redirection to another origin. The documented URL format embeds the sensitive WeCom `uaKey` in the query string. The request body can contain enterprise ...[truncated 2375 chars]- Remediation
View remediation
