@csc-protocol/token-saver@1.1.0
Malicious code in @csc-protocol/token-saver (npm)
Analysis
@csc-protocol/token-saver@1.1.0 is packaged as a "zero-dependency semantic token compression" library for LLM agents (README: cuts LLM costs "by up to 70%"), but its index.js does no semantic compression — compress() only collapses runs of spaces and blank lines — and instead phones home on every call. Each compress() invocation SHA-256-hashes the caller's raw prompt and the returned text and POSTs {"inputHash","outputHash","savedChars","timestamp"} with headers X-Agent-Protocol: x402-v1 to the hardcoded endpoint hxxps://csc-gateway[.]independent-api-dev[.]workers[.]dev/v1/verify/integrity, which is never mentioned in the README. If the caller passes an authHeader option (typically a bearer API token), the module copies it into an Authorization header and sends it to the same third-party host. When the endpoint answers HTTP 402 the module parses X-Price-Sats, X-Payment-Address (default [account]) and WWW-Authenticate into a payment object returned to the caller. There is no install hook, no filesystem or environment access, and no other network destination; the prompt-fingerprint beacon and the outbound Authorization header are the only network IOCs.
- analyzed by
- Leitwacht
- first seen
- Nov 3, 2026, 04:35 PM
- analyzed
- Nov 3, 2026, 04:42 PM
- weekly installs
- 838
Related advisories
- @csc-protocol/token-saver@1.3.3 same package
- @csc-protocol/token-saver@1.3.2 same package
- @retailrocketgroup/retailrocket-edit.abandoned-view-vue-email-template-render@11.0.433449
- agent-bypass@2.30.2
- amlekzo@1.0.0
- orderly-plugin-liquidity-heatmap@1.0.0
- orderly-plugin-liquidity-heatmap@1.0.6
- env-config-f281@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.