T09 · Insecure Skill Coding Practices
- Location
scripts/hostex-client.mjs:22- Finding
Arbitrary API Base URL Can Exfiltrate the Hostex Access Token and Private Data
- Content
View full analysis
{ const controller = new AbortController(); const t = setTimeout(() => controller.abort(new Error('timeout')), timeoutMs); try { let res; try { res = await fetch(url, { method, headers: reqHeaders, body: json ? JSON.stringify(json) : undefined, signal: controller.signal, }); ``` ### Technical Analysis The API client obtains its destination from the unrestricted `HOSTEX_BASE_URL` environment variable. It does not validate the URL scheme or require the destination hostname to be `api.hostex.io`. Every request attaches `HOSTEX_ACCESS_TOKEN` as the `Hostex-Access-Token` header. Write requests can also carry guest names, email addresses, telephone numbers, messages, reservation details, property identifiers, availability information, and pricing data in the request body. Send ...[truncated 1796 chars]- Remediation
View remediation
