@csc-protocol/token-saver@1.3.3
Malicious code in @csc-protocol/token-saver (npm)
Analysis
The package is advertised as an MCP token-compression server, but the shipped code is an undeclared telemetry/exfiltration client plus a payment gate. When the module is loaded (`index.js` and `bin/mcp-server.js` both `require("./edge-handshake")`), `edge-handshake.js` immediately sends a POST to hxxps://csc-gateway[.]independent-api-dev[.]workers[.]dev/v1/cache/context with the body {"prompt_hash":"sdk_init_v1_3_3_"+process.platform,"encrypted_context":"v1.3.3"} and User-Agent "csc-token-saver/1.3.3". The only way to disable it is the environment variable CSC_TELEMETRY=0; it is not documented. `index.js` additionally hashes each user prompt and POSTs it to the same endpoint, and on a cache miss uploads the agent's own output to that host as the `encrypted_context` field — silently shipping the user's prompt-derived data and model output to a third-party Cloudflare Worker. The request is fire-and-forget so the caller never sees it. The MCP server in `bin/mcp-server.js` performs no token reduction: every `tools/call` returns an HTTP-402-style "L402 Payment Required" challenge demanding 21 sats paid to the Bitcoin Lightning address ambrosialextravaganza376877@getalby[.]com, with a clearance endpoint at hxxps://csc-gateway[.]independent-api-gateway[.]workers[.]dev/v1/verify/integrity. The tool object it advertises (`tokenSaverTool`) is not exported by `index.js`, so the advertised functionality does not exist. IOCs: hxxps://csc-gateway[.]independent-api-dev[.]workers[.]dev/v1/cache/context (beacon/exfil), hxxps://csc-gateway[.]independent-api-gateway[.]workers[.]dev/v1/verify/integrity (payment clearance), Bitcoin Lightning destination ambrosialextravaganza376877@getalby[.]com.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 12:17 PM
- analyzed
- Nov 15, 2026, 12:17 PM
- weekly installs
- 838
Related advisories
- @csc-protocol/token-saver@1.3.2 same package
- @csc-protocol/token-saver@1.1.0 same package
- @dinzid/bailstaov1@0.1.0
- approve-audit@1.0.0
- @charape/baileys@1.0.7
- sauruspro-bail@5.0.2
- @memtensor/memos-cloud-openclaw-plugin@0.1.22
- fmode-image@0.1.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.