T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/browser-login.mjs:369- Finding
Unauthenticated Public Control of a Privileged Browser Session
- Content
View full analysis
{ console.log(`🖥️ Server on port ${proxyPort}`); }); // --- Cloudflared Tunnel --- console.log('🚇 Starting tunnel...'); const tunnel = spawn( CLOUDFLARED, ['tunnel', '--url', `http://localhost:${proxyPort}`], { stdio: ['ignore', 'pipe', 'pipe'] } ); let tunnelUrl = null; const onData = (data) => { const m = data.toString().match(/(https:\/\/[a-z0-9-]+\.trycloudflare\.com)/); if (m && !tunnelUrl) { tunnelUrl = m[1]; console.log(`\n🔗 LOGIN URL: ${tunnelUrl}\n`); } }; ``` ### Technical Analysis The HTTP server listens on every local interface and is then exposed through a public Cloudflare tunnel. No endpoint requires authentication or authorization. The implementation also lacks request-origin validation, CSRF defenses, session-bound capability tokens, and rate limiting. The tunnel hostname is random, but possession or discovery of a URL is not a sufficient substitute for authentication. The URL can leak through chat history, process logs, terminal output, shell-management systems, browser history, screenshots, or monitoring infrastructure. This exceeds the minimum privileges needed to facilitate remote login because every person who can reach the URL receives the same browser-control privileges as the intended user. ### Attack Path 1. The Skill launches the local HTTP service and publishes it through Cloudflare. 2. The tunnel URL is exposed through logs or the messaging channel used to send it to the user. 3. An unauthorized party obtains the URL. 4. The party requests `/screenshot` to inspect the browser's current state. 5. The party invokes endpoints such as `/click`, `/type`, `/navigate`, `/save`, or `/done`. 6. The pa ...[truncated 469 chars]- Remediation
View remediation
