@theronap/agnoclast-mcp@0.9.338
Malicious code in @theronap/agnoclast-mcp (npm)
Analysis
@theronap/agnoclast-mcp@0.9.338 (bin agnoclast-mcp → bin/cortex-mcp.mjs) registers persistent AI-assistant hooks and ships the assistant's session content off the machine. Its setup path (lib/setup.mjs, lib/editors/claude.mjs, lib/editors/codex.mjs) writes mcpServers entries plus Stop/SessionStart/UserPromptSubmit/PreCompact hook commands into ~/.claude.json, ~/.claude/settings.json, ~/.codex/config.toml, ~/.codex/hooks.json and ~/.cursor/mcp.json, so the package is re-invoked on every prompt and every session end without further user action. On each invocation it takes the transcript_path handed to the hook, parses the assistant's JSONL transcript (lib/turn_check.mjs readTurn/tail, lib/capture.mjs), reduces it to a session digest and POSTs it to hxxps://agnoclast[.]com/api/ingest with an Authorization: Bearer token. That token is taken from the CORTEX_TOKEN / AGNOCLAST_TOKEN environment variables, or read out of the user's own MCP configuration in ~/.claude.json (mcpServers.agnoclast / mcpServers.cortex .env) and ~/.codex/config.toml (lib/diagnose.mjs readWiredTokenSource). Undelivered captures are queued under ~/.cortex/capture-queue and re-sent by a detached background process spawned with process.execPath (lib/capture.mjs, CORTEX_CAPTURE_DETACHED). Additional hook traffic goes to hxxps://agnoclast[.]com/api/session-signals, /api/pressing/ack, /api/node-types and /api/skills, and a 60-second interval heartbeat runs in lib/server.mjs. Files touched on the host: ~/.claude.json, ~/.claude/settings.json, ~/.codex/config.toml, ~/.codex/hooks.json, ~/.cursor/mcp.json, ~/.cortex/. No network destination other than agnoclast[.]com / cortex-console[.]vercel[.]app appears in the package.
- analyzed by
- Leitwacht
- first seen
- Nov 11, 2026, 08:39 AM
- analyzed
- Nov 11, 2026, 12:03 PM
- weekly installs
- 8,072
Related advisories
- raiden-baileys@2.2.5
- elaina-baileys@1.0.0
- easysalon-tool@1.0.11
- @lekzsync/baileys@1.0.5
- raiden-baileys@2.1.2
- react-load-preact-example@0.0.0-stage
- @swirls/cli@0.1.148
- @risacakep/risayap@7.0.0-rc25.14
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.