Loading npm security reports…
Loading npm security reports…
polyrouter: AI-agent control-surface risk – 1.0.35 flagged | LPM Firewall
npm / AI-agent control-surface risk / polyrouter Local AI gateway and OpenAI-compatible API router for AI coding tools and 60+ providers
This report shows the evidence for polyrouter@1.0.35 . 1 of 25 known versions is blocked or flagged. The newest version, 1.0.42, is flagged.
Soft block: AI-agent control surface
Warn by default; block when configured. An AI agent can be steered into package-selected tool execution and away from normal response behavior, subject only to the outer client's sandbox and approvals.
AI security reviewscanned on Sep 20, 2026, 08:39 UTC · by lpm-firewall-ai The bundled runtime contains an active, default-enabled AI control prompt that compels package-selected tool use and suppresses transparent assistant behavior. Although the outer client retains its approval policy, this is concrete agent-control hijacking behavior.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
A ChatGPT Web request with tools while MCP is not explicitly disabled.
Impact
An AI agent can be steered into package-selected tool execution and away from normal response behavior, subject only to the outer client's sandbox and approvals.
Mechanism
The bundled server code adds instructions to bind a turn token, inventory tools, invoke the required tool, continue tool use until completion, and hide proposed tool calls.
Policy narrative
When the ChatGPT Web MCP path is active, the package inserts a directive into the model context. It requires a token-binding call and subsequent PolyRouter tool calls before any answer, tells the model to keep calling tools until completion, and prohibits displaying proposed calls. This is active control of an AI agent's tool-use behavior, not ordinary transport routing.
Evidence
app/.next-cli-build/server/chunks/8836.js
public snapshot
AI identified this as a dangerous AI-agent capability at 94.0% confidence with low false-positive risk.
Evidence for policy risk
The ChatGPT Web provider enables its MCP path by default when tools are present. That path injects instructions that force an AI to bind to PolyRouter tools before answering and to keep invoking them until completion. The injected text suppresses normal assistant tool-call disclosure, creating a concrete agent-control hijack surface. Evidence against
The injected path states that the outer client still applies its normal sandbox and approval policy. The bundled browser connector asks the user to confirm before importing a provider session. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Filesystem · Network · Shell · Web socket
Supply chain High entropy strings · Minified · Possible obfuscation · URL strings
Manifest No manifest risk signals triggered.
Scanned 50 files · 613 KB of source
7 external domains referenced
127.0.0.1 api.anthropic.com api.example.com chatgpt.com fzdduustinwqhotqlpua.supabase.co registry.npmjs.org www.apple.com Findings5 critical · 14 high · 15 medium · 7 low Source & flagged code33 flagged High Install time lifecycle scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg Medium Ambiguous install lifecycle script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg Shared scanner record · 2 findings · 1 line scripts.postinstall = node hooks/postinstall.js
app/.next-cli-build/server/instrumentation.js View file Medium Secret pattern
Package contains a possible secret pattern.
app/.next-cli-build/server/instrumentation.js View on unpkg · L8 Code excerpt · 3 lines 8 patternName = generic_password
severity = medium
line = 8
High Child process
Package source references child process execution.
app/src/mitm/server.js View on unpkg · L32 Shared code excerpt · 2 findings · 3 lines 32 `)}catch{}}var od=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let a=t;for(let r=0;r<8;r++)a=a&1?3988292384^a>>>1:a>>>1;e[t]=a}return e})();function Po(e){let t=42949672...
33 `);t.push({role:"tool",tool_call_id:n.toolUseId||"",content:s})}let r=(e.content||"").trim();return(r||a.length===0)&&t.push({role:"user",content:r}),t}function fd(e){let t=e.toolU...
34 $proc = Start-Process powershell -ArgumentList @(
High Command output exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
app/src/mitm/server.js View on unpkg · L24 Code excerpt · 5 lines app/node_modules/minimizer-webpack-plugin/dist/minify.js View file High Eval
Package source references dynamic code evaluation.
app/node_modules/minimizer-webpack-plugin/dist/minify.js View on unpkg · L487 Code excerpt · 3 lines 487 // eslint-disable-next-line no-new-func
488 new Function ("exports" , "require" , "module" , "__filename" , "__dirname" , `'use strict'\nreturn ${options}`
489 // eslint-disable-next-line n/exports-style
Medium Dynamic require
Package source references dynamic require/import behavior.
app/server.js View on unpkg · L1 Code excerpt · 2 lines 1 const path = require ('path' )
2
app/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js View file Medium Unsafe vm context
Package source executes code through a VM context API.
app/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js View on unpkg · L1 Code excerpt · 3 lines 1 /*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
app/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js View file Low Weak crypto
Package source references weak cryptographic algorithms.
app/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js View on unpkg · L39 Code excerpt · 12 lines 39 };
40 var __privateIn = (member, obj) => {
41 if (Object (obj) !== obj)
⋯
71
72 // ../../node_modules/.pnpm/undici@6.21.0/node_modules/undici/lib/core/symbols.js
73 var require_symbols = __commonJS ({
⋯
98 kBodyUsed: Symbol ("used" ),
99 kBody: Symbol ("abstracted request body" ),
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
src/cli/tray/autostart.js View on unpkg · L3 Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
src/cli/tray/autostart.js View on unpkg · L3 Shared code excerpt · 2 findings · 12 lines Trigger-reachable persistence chain: scripts.dev -> cli.js -> src/cli/tray/autostart.js
3 const os = require ("os" );
4 const { execSync } = require ("child_process" );
5
⋯
36 }
37 const computed = path.resolve (__dirname, ".." , ".." , , );
Critical Same file environment network execution
A single source file combines environment access, network access, and code or shell execution with blocking evidence.
cli.js View on unpkg · L783 Code excerpt · 9 lines 783 console.log (`🔔 PolyRouter is running in tray (PID: ${process.pid})` );
784 console.log (` Server: http://${displayHost}:${port}` );
785 console.log (`\n💡 You can close this terminal. Right-click tray icon to quit.\n` );
⋯
793
794 const bgProcess = spawn (process.execPath, ["--dns-result-order=ipv4first" , __filename, "--tray" , "--skip-update" , "-p" , port.toString ()], {
795 detached: true ,
High Credential exfiltration
Source combines credential-like environment material and outbound requests; review data flow before blocking.
app/src/realtime/runtime.js View on unpkg · L1 Code excerpt · 11 lines 1 import { WebSocketServer, WebSocket } from "ws" ;
2 import RealtimeUpstream from "./upstream.js" ;
⋯
19 const internalHost = getInternalAuthHost (host);
20 const response = await fetch (`http://${internalHost}:${process.env.PORT || 20128}/api/realtime/authorize` , {
21 method: "POST" ,
⋯
32 },
33 body: JSON.stringify ({
app/node_modules/playwright-core/lib/coreBundle.js View file High Obfuscated payload loader
Source contains an obfuscated payload loader that reconstructs and executes hidden code.
app/node_modules/playwright-core/lib/coreBundle.js View on unpkg · L21933 Code excerpt · 3 lines 21933 "use strict" ;
21934 source5 = '\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n ...
21935 }
app/node_modules/next/dist/compiled/jest-worker/threadChild.js View file Critical Remote response code execution
Source passes code obtained from a remote response into a dynamic execution sink.
app/node_modules/next/dist/compiled/jest-worker/threadChild.js View on unpkg · L1 Code excerpt · 1 line 1 (()=>{"use strict" ;var __webpack_modules__={582 :(e,r)=>{Object.defineProperty (r,"__esModule" ,{value:true });r.PARENT_MESSAGE_SETUP_ERROR=r.PARENT_MESSAGE_OK=r.PARENT_MESSAGE_CUSTOM=...
High Runtime package install
Package source invokes a package manager install command at runtime.
app/src/lib/updater/updater.js View on unpkg · L1 Code excerpt · 6 lines 1 // Standalone detached updater process.
2 // Spawns `npm i -g <pkg>@latest`, exposes progress via tiny HTTP server.
3 // Survives after parent Next server exits (detached + unref by spawner).
4
5 const { spawn } = require ("child_process" );
6 const http = require ("http" );
app/node_modules/@ngrok/ngrok-linux-x64-gnu/ngrok.linux-x64-gnu.node View file Critical Binary string ioc
Native or WebAssembly artifact printable strings contain known collector or webhook infrastructure.
app/node_modules/@ngrok/ngrok-linux-x64-gnu/ngrok.linux-x64-gnu.node View on unpkg Scanner record · 6 lines path = app/node_modules/@ngrok/ngrok-linux-x64-gnu/ngrok.linux-x64-gnu.node
kind = binary_string_ioc
sizeBytes = 11022768
magicHex = [redacted]
matchedPrintableString = x.crates.io-6f17d22bba15001f/proxy-protocol-0.5.0/src/version1.rscryptoproviderkx_groupssignature_verification_algorithmssecure_randomkey_providerillegaladdressfamilymissingaddressinvalidaddressinvalidportillegalheaderendingstdiodestinationhttps://ngrok.com/docs/errors
"0", "1", "2", or "3"0, 1, or 2struct authrespstruct authrespextrastruct bindrespextrastruct starttunnelwithlabelrespstruct unbindrespstruct proxyheaderevent /[redacted].crates.io-6f17d2
Medium Ships native binary
Package ships native binary artifacts.
app/node_modules/@ngrok/ngrok-linux-x64-gnu/ngrok.linux-x64-gnu.node View on unpkg Medium Ships build helper
Package ships non-JavaScript build or shell helper files.
src/cli/tray/tray.ps1 View on unpkg Scanner record · 4 lines path = src/cli/tray/tray.ps1
kind = build_helper
sizeBytes = 4795
magicHex = [redacted]
app/public/downloads/polyrouter-connector.zip View file High Ships high entropy blob
Package ships high-entropy non-source blobs.
app/public/downloads/polyrouter-connector.zip View on unpkg Scanner record · 4 lines path = app/public/downloads/polyrouter-connector.zip
kind = high_entropy_blob
sizeBytes = 41038
magicHex = [redacted]
Medium Ships compressed blob
Package ships compressed or archive-like blobs.
app/public/downloads/polyrouter-connector.zip View on unpkg Scanner record · 4 lines path = app/public/downloads/polyrouter-connector.zip
kind = compressed_blob
sizeBytes = 41038
magicHex = [redacted]
Low Nested archive needs inspection
app/node_modules/next/dist/build/next-config-ts/transpile-config.js#virtual:normalized:round1 View file High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
app/node_modules/next/dist/build/next-config-ts/transpile-config.js#virtual:normalized:round1 View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 54
app/node_modules/@next/env/dist/index.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
app/node_modules/@next/env/dist/index.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = shieldcortex@5.0.1
matchedPath = dashboard/.next/standalone/dashboard/node_modules/@next/env/dist/index.js
matchedIdentity = npm:c2hpZWxkY29ydGV4:5.0.1
similarity = 1.000
summary = normalized source hash matched finalized malicious source
app/.next-cli-build/server/chunks/7688.js View file Medium Secret pattern
Hardcoded password in app/.next-cli-build/server/chunks/7688.js
app/.next-cli-build/server/chunks/7688.js View on unpkg · L197 Code excerpt · 3 lines 197 patternName = generic_password
severity = medium
line = 197
app/.next-cli-build/server/chunks/6770.js View file Medium Secret pattern
Hardcoded password in app/.next-cli-build/server/chunks/6770.js
app/.next-cli-build/server/chunks/6770.js View on unpkg · L215 Code excerpt · 3 lines 215 patternName = generic_password
severity = medium
line = 215
app/.next-cli-build/static/chunks/3771-3644573d812f5988.js View file Medium Secret pattern
Hardcoded password in app/.next-cli-build/static/chunks/3771-3644573d812f5988.js
app/.next-cli-build/static/chunks/3771-3644573d812f5988.js View on unpkg · L9 Code excerpt · 3 lines 9 patternName = generic_password
severity = medium
line = 9
app/.next-cli-build/static/chunks/main-d6eb74e339715f4d.js View file Medium Secret pattern
Hardcoded password in app/.next-cli-build/static/chunks/main-d6eb74e339715f4d.js
app/.next-cli-build/static/chunks/main-d6eb74e339715f4d.js View on unpkg · L6 Code excerpt · 3 lines 6 patternName = generic_password
severity = medium
line = 6
Versions25 known versions Version Type Decision Report Released
1.0.42 latest Agent extension lifecycle risk Warning Published Oct 9, 2026 1.0.38 Staged payload carrier Warning Published Sep 22, 2026 1.0.35 Soft block: AI-agent control surface Soft block Published Sep 20, 2026 1.0.30 Install hook abuse Warning Published Sep 16, 2026 1.0.29 Install hook abuse Warning Published Sep 10, 2026 1.0.28 Install hook abuse Warning Published Sep 10, 2026 1.0.27 Install hook abuse Warning Published Sep 9, 2026 1.0.25 Install hook abuse Warning Published Sep 9, 2026 1.0.24 Install hook abuse Warning Published Sep 6, 2026 1.0.19 Install hook abuse Warning Published Sep 2, 2026 1.0.17 Credential exfiltration Warning Published Aug 23, 2026 1.0.15 AI-agent capability abuse Warning Published Aug 21, 2026 1.0.14 Staged payload carrier Warning Published Aug 12, 2026 1.0.13 — Warning Published Aug 7, 2026 1.0.12 AI-agent capability abuse Warning Published Aug 5, 2026 1.0.11 AI-agent capability abuse Warning Published Aug 4, 2026 1.0.8 AI-agent capability abuse Warning Published Aug 1, 2026 1.0.6 — Warning Published Jul 30, 2026 Show 8 more versions Show fewer versions 7 versions are still under review and not listed.
AI assessment confidence 94%
Certainty of the AI review, not severity.
Verdict details False-positive risk, Review stage, Firewall policy This finding concerns changes to an AI agent's instructions or configuration without explicit user action. It does not by itself establish malware intent. The CLI warns by default and blocks when configured for this policy.
Package metadata npm Version 1.0.35
Published Sep 20, 2026
License MIT
Dependencies 5
Integrity verified
Package size 33.6 MB
Files 4,948
Keywords polyrouter ai gateway ai router openai compatible openai api ai coding tools llm gateway llm router
Runtime surface package.json Entrypoints bin → polyrouter
Runtime node >=18.0.0
Artifact 126 MB unpacked · 4,948 files 2 signatures
Install lifecycle postinstall prepublishOnly
On this report AI security review Decision evidence Findings41 Flagged code33 Remediation Versions ↓
app/node_modules/minimizer-webpack-plugin/dist/minify.js1 finding
High Eval Code↓ Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
app/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js1 finding
Low Weak crypto Code↓ 24
Private-MAC: `+B.digest().toHex()+` \r
25 `,s};ma.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=Ce.util.createBuffer();return vr(r,a),Et(r,e.e),Et(r,e.n),a+" "+Ce.util.encode64(r.bytes())+" "+t};ma.private...
26 `);u=c.pop()||"";for(let g of c){let v=g.trim();if(!v||!v.startsWith("data:"))continue;let y=v.slice(5).trim();if(y!=="[DONE]"){process.env.DEBUG_MITM&&Ea(` [SSE in ] ${y.slice (0 ,200 ...
32 `)}catch{}}var od=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let a=t;for(let r=0;r<8;r++)a=a&1?3988292384^a>>>1:a>>>1;e[t]=a}return e})();function Po(e){let t=42949672...
33 `);t.push({role:"tool",tool_call_id:n.toolUseId||"",content:s})}let r=(e.content||"").trim();return(r||a.length===0)&&t.push({role:"user",content:r}),t}function fd(e){let t=e.toolU.
100 kRunning: Symbol ("running" ),
565 const code = this .code = key.charCodeAt (index);
".."
"cli.js"
38 if (fs.existsSync (computed)) return computed;
47 function enableAutoStart (cliPath) {
48 const platform = process.platform;
50 if (!["darwin" , "win32" , "linux" ].includes (platform)) return false ;
51 if (platform === "linux" && !process.env.DISPLAY) return false ;
⋯
798 env: { ...process.env }
Critical Download execute
Source downloads or fetches remote code and executes it.
cli.js View on unpkg · L2 Code excerpt · 11 lines 3 const { spawn, exec, execSync } = require ("child_process" );
4 const path = require ("path" );
5 const fs = require ("fs" );
6 const https = require ("https" );
7 const net = require ("net" );
⋯
36 start () {
37 if (process.stdout.isTTY) {
38 process.stdout.write (`\r${frames[0]} ${currentText}` );
39 interval = setInterval (() => {
⋯
64
65 const pkg = require ("./package.json" );
Critical Trigger reachable dangerous capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
cli.js View on unpkg · L2 High Cross file remote execution context
Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.
cli.js View on unpkg · L2 Shared code excerpt · 2 findings · 12 lines Trigger-reachable chain: scripts.dev -> cli.js
2
3 const { spawn, exec, execSync } = require ("child_process" );
4 const path = require ("path" );
5 const fs = require ("fs" );
6 const https = require ("https" );
7 const net = require ("net" );
⋯
36 start () {
37 if (process.stdout.isTTY) {
38 process.stdout.write (`\r${frames[0]} ${currentText}` );
39 interval = setInterval (() => {
⋯
64
65 const pkg = require ("./package.json" );
34 model: url.searchParams.get ("model" ),
41 const payload = await response.json ().catch (() => ({}));
42 if (!response.ok || !payload.accessToken) throw new Error (payload.error || "Realtime authentication failed." );
259
//
260 // https://developer.apple.[redacted]ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-BBCIAHJF:~:...
261 return input.replaceAll(/[\\"]/g, (original)=>`\\${original}`);\n}\nfunction launchEditor(fileName, line1, column1) {\n if (!_fs.default.existsSync(fileName)) {\
Scanner record · 4 lines path = app/node_modules/@ngrok/ngrok-linux-x64-gnu/ngrok.linux-x64-gnu.node
kind = native_binary
sizeBytes = 11022768
magicHex = [redacted]
Package ships a nested archive or MCP bundle that was inventoried but not recursively analyzed.
app/public/downloads/polyrouter-connector.zip
Scanner record · 4 lines path = app/public/downloads/polyrouter-connector.zip
kind = nested_archive_needs_inspection
sizeBytes = 41038
magicHex = [redacted]