Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of polyrouter

[email protected]

suspicious   confidence 50%   action isolate   analyzed 2026-09-24 17:48 UTC by yolo in 12 tool calls, with lab detonation

Summary

The postinstall hook installs runtime SQLite and tray deps into ~/.polyrouter/runtime — clean. The bundled Next.js server (localhost:20128) auto-imports Cursor OAuth access tokens from ~/.config/Cursor/User/globalStorage/state.vscdb and modifies ~/.claude/settings.json. These are runtime capabilities, not install-time, but pose a risk if the dashboard is bound to 0.0.0.0.

Intent

A local AI gateway that auto-imports OAuth tokens from installed IDEs (Cursor, etc.) into its own dashboard for seamless provider authentication. The install hook is benign; the runtime server has credential access that could be exploited if the dashboard is network-exposed.

credential_access agent_config_tamper

Findings

Runtime credential access (Cursor OAuth tokens) medium app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js:1
GET /api/oauth/cursor/auto-import reads Cursor's SQLite state.vscdb for cursorAuth/accessToken and storage.machineId keys. Returns tokens to the local dashboard frontend.
AI tool config modification medium app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js:1
POST /api/cli-tools/claude-settings writes to ~/.claude/settings.json, injecting ANTHROPIC_BASE_URL and other env vars. DELETE resets them.
System impersonation in hidden page low app/.next-cli-build/server/app/dashboard/token-saver.html:1
app/.next-cli-build/server/app/dashboard/token-saver.html contains a page that impersonates a system/operator message (inj:system_impersonation).
Install hook installs runtime deps info hooks/postinstall.js:6-7
hooks/postinstall.js runs npm install [email protected] and [email protected] into ~/.polyrouter/runtime/node_modules. Harmless but uses network.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 8. Hooks: postinstall (timed out).

DNS names requested: registry[.]npmjs[.]org

Direct connections: socket 127[.]0[.]0[.]1:53

Canary credential files read: /home/andy/.gitconfig

Files written outside the package: /home/andy/.polyrouter/runtime/package.json