T05 · Unauthorized Access and Privilege Escalation
- Location
fetch-article.js:3- Finding
Unrestricted URL Navigation Enables Server-Side Request Forgery
- Content
View full analysis
'); process.exit(1); } ``` ```javascript await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 }); ``` The workflow passes the supplied URL directly to this script: ```bash node "${CLAUDE_SKILL_DIR}/fetch-article.js" "" ``` ### Technical Analysis The script accepts an arbitrary command-line URL and passes it directly to Playwright without validating: - The URL protocol. - The destination hostname or resolved IP address. - Loopback, private, link-local, multicast, or reserved address ranges. - Redirect destinations. - Secondary network requests initiated by the loaded page. Because Playwright operates from the agent's execution environment, the browser may reach resources that are inaccessible to an external attacker. Examples include loopback services, internal administrative interfaces, private network applications, and cloud instance metadata endpoints. The script subsequently extracts `document.body.innerText` when article-specific selectors are absent. Therefore, text returned by an internal endpoint may be included in the script's JSON output, summarized by the agent, or uploaded to Feishu. The network access required for public article retrieval is legitimate, but unrestricted access to arbitrary protocols and network destinations exceeds the minimum privileges required for that functionality. ### Attack Path 1. An attacker supplies a URL pointing to a loopback, private-network, or link-local service, or supplies a public URL that redirects to such a destination. 2. The Skill invokes `fetch-article.js` with the attacker-controlled URL. 3. Playwright navigates ...[truncated 1147 chars]- Remediation
View remediation
