OpenSSF/OSV advisory MAL-2026-5481 confirms this npm version as malicious. Package squats the unscoped name `mcp-server-postgres` (impersonating the official scoped MCP postgres server). package.json declares `"postinstall": "node index.js"`, which fires unconditionally on `npm install`. index.js loads `os`, `https`, and `http`, then POSTs a JSON body containing `os.hostname()`, `process.cwd()`, the npm user-agent, Node version, and `os.platform()` to a hardcoded Cloudflare Workers...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in mcp-server-postgres (npm)
Details
Package squats the unscoped name `mcp-server-postgres` (impersonating the official scoped MCP postgres server). package.json declares `"postinstall": "node index.js"`, which fires unconditionally on `npm install`. index.js loads `os`, `https`, and `http`, then POSTs a JSON body containing `os.hostname()`, `process.cwd()`, the npm user-agent, Node version, and `os.platform()` to a hardcoded Cloudflare Workers endpoint at `https://npx-canary-log.vulnerable-live.workers.dev/log`. Installers and CI systems running `npm install` or `npx mcp-server-postgres` leak host identifiers and working-directory paths to a third-party endpoint without consent. Although the author self-describes the package as a 'canary' for npx-confusion research, the typosquat name combined with unsolicited install-time host telemetry exfiltration constitutes a supply-chain attack against installers.
Decision reason
OSV/OpenSSF confirms mcp-server-postgres@0.0.2 as malicious package MAL-2026-5481. Malicious code in mcp-server-postgres (npm)