T09 · Insecure Skill Coding Practices
- Location
assets/main_handler.js:9- Finding
Unrestricted target URL enables server-side request forgery and internal network access
- Content
View full analysis
document.body.innerText); console.log(JSON.stringify({ status: 'SUCCESS', type: 'GENERIC', title, data: content.substring(0, 10000) })); } ``` It is then submitted to Crawlee without validation: ```javascript crawler.run([targetUrl]); ``` The same issue exists in `assets/youtube_handler.js`: ```javascript const targetUrl = process.argv[2]; const videoId = targetUrl.split('v=')[1]?.split('&')[0]; // ... await page.goto(targetUrl, { waitUntil: 'networkidle' }); // ... crawler.run([targetUrl]); ``` ### Technical Analysis Both handlers treat a command-line argument as a trusted navigation target. There is no URL parser, protocol restriction, hostname allowlist, DNS resolution check, or rejection of loopback, private, link-local, and container-internal addresses. The documented `main_handler.js` interface intentionally supports generic URLs, meaning an attacker who can control the argument can instruct the browser to request services reachable from the scraper environment. The page title and body text are returned through standard output, so responses from HTTP-based internal services m ...[truncated 2504 chars]- Remediation
View remediation
