T09 · Insecure Skill Coding Practices
- Location
scripts/prepare_task_assets.js:47- Finding
Automatic image localization permits server-side request forgery
- Content
View full analysis
controller.abort(), 60000); try { const response = await fetch(url, { redirect: "follow", signal: controller.signal, headers: { "user-agent": "openclaw-pipeline/prepare-task-assets", }, }); if (!response.ok) { throw new Error(`http ${response.status}`); } const arrayBuffer = await response.arrayBuffer(); return { buffer: Buffer.from(arrayBuffer), contentType: response.headers.get("content-type") || "", finalUrl: response.url || url, }; } finally { clearTimeout(timer); } } ``` The public runner invokes asset preparation automatically unless the user supplies `--skip-assets`. ### Technical Analysis Any HTTP or HTTPS URL embedded using Markdown image syntax is fetched from the machine running the skill. The implementation does not validate the destination hostname or resolved IP address before making the request. Consequently, an untrusted paper or Markdown document can cause requests to: - Loopback services such as `127.0.0.1` or `[::1]`. - Private network ranges. - Link-local services, including cloud metadata endpoints. - Internal DNS names unavailable to the document author. - Service ...[truncated 1919 chars]- Remediation
View remediation
