T09 · Insecure Skill Coding Practices
- Location
scripts/auth_server.js:134- Finding
Public Default Binding and Plaintext Bearer-Token Transport
- Content
View full analysis
Vulnerability Details
File Location:
scripts/auth_server.js, lines 134-140
Vulnerability Type: Insecure network exposure and sensitive token transmission
Risk Level: Highjavascript if (require.main === module) { const args = process.argv.slice(2); const port = parseInt(args[0]) || 19191; const sessionFile = args[1] || 'session.json'; const host = process.env.AUTH_HOST || '0.0.0.0'; const token = process.env.AUTH_TOKEN || crypto.randomBytes(16).toString('hex'); startServer({ port, host, sessionFile, token }); }The generated access URL is also explicitly printed using plaintext HTTP:
javascript const displayHost = host === '0.0.0.0' ? 'YOUR_IP' : host; console.log(`\n🚀 BROWSER AUTH SERVER READY`); console.log(`Access Link: http://${displayHost}:${port}/?token=${token}\n`);Technical Analysis
When the script is executed directly, it binds to
0.0.0.0unlessAUTH_HOSTis explicitly configured. This exposes the browser-control service on every available network interface and contradicts the documented secure default of127.0.0.1.Authentication depends on a bearer token included in the URL query string. The generated URL uses unencrypted HTTP. Although the application sets a no-referrer policy and removes the token from the browser address bar after loading, these measures do not prevent interception over the network. Query-string tokens may also be exposed through browser history, copied URLs, reverse-proxy logs, monitoring systems, or console logs.
An authenticated Socket.IO client can receive browser screenshots, send keyboard input, navigate the browser, and request session capture. Consequently, disclosure of this token grants substantial control over an authentication session.
Attack Path
- An operator starts
auth_server.jswithout explicitly settingAUTH_HOST. - The service listens on
0.0.0.0, making it reachable through a ...[truncated 919 chars]
- An operator starts
- Remediation
View remediation
Remediation Suggestions
- Change the direct-execution default from
0.0.0.0to127.0.0.1. - Require an explicit unsafe-network override before permitting a non-loopback bind address.
- Do not expose the service directly to an untrusted network; require an authenticated SSH, VPN, or similarly protected tunnel.
- Terminate TLS before any remote access and reject plaintext remote connections.
- Replace query-string authentication with a short-lived, single-use credential delivered through a protected mechanism.
- Expire the token after the first successful client connection or after a short timeout.
- Avoid printing complete bearer tokens to shared logs.
- Add connection rate limiting and audit logging without recording credentials.
- Change the direct-execution default from
