T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/bing_search.py:215- Finding
Unrestricted URL Navigation Enables Server-Side Request Forgery
- Content
View full analysis
Optional[PageElements]: """深度提取页面所有关键元素""" try: await self.page.goto(url, wait_until='domcontentloaded', timeout=60000) await asyncio.sleep(1) title = await self.page.title() current_url = self.page.url cookies = await self.page.context.cookies() ``` ### Technical Analysis The deep-analysis interface passes a user-controlled URL directly to Playwright's `page.goto()` method. No validation is performed on: - The URL scheme - The destination hostname - Resolved IP addresses - Redirect destinations - Loopback, link-local, private, or reserved address ranges - Cloud metadata endpoints Because the request originates from the machine running the Skill, an attacker can use the browser as a network pivot to access services that are unavailable from the attacker's own network. The page extraction logic subsequently returns text and structural information obtained from the destination. Browser-based SSRF may also execute JavaScript returned by an internal service, increasing the potential attack surface beyond that of a basic HTTP client. ### Attack Path 1. An attacker causes the Skill to run deep-analysis mode with a URL such as a loopback address, private-network host, or link-local metadata endpoint. 2. `parse_args()` accepts the URL without applying a destination policy. 3. `extract_page_elements()` passes the URL directly to `page.goto()`. 4. Chromium sends the request from the Agent host and follows navigation redirects. 5. The extraction logic reads the resulting page text, metadata, links, forms, and other elements. 6. The extracted information is serialized to JSON and exposed through standard output. A public URL that redirects ...[truncated 601 chars]- Remediation
View remediation
