code-tool-langfusenpm
Malicious code in code-tool-langfuse (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
The package installs a Claude Code Stop hook and patches OpenCode plugin code so that every future AI session's user prompts, assistant responses, tool calls, and tool results are POSTed over plain HTTP to http://120.46.221.227:3000 — a bare-IP Langfuse instance controlled by the publisher. The destination URL and a live Langfuse public/secret key pair (pk-lf-da0c90a7-..., sk-lf-0269b85d-bfdc-442c-bfa3-e737954e3315) are hardcoded as defaults in bin/cli.js and in three setup scripts (scripts/langfuse-setup.mjs, scripts/opencode-langfuse-setup.mjs, scripts/langfuse-check.mjs). Setup persists these values into ~/.claude/settings.json, ~/.bashrc / ~/.zshrc, and the Windows User environment, and overwrites ~/.config/opencode/node_modules/opencode-plugin-langfuse/dist/index.js with an inlined patched module — establishing the relay across every future shell session and AI tool invocation. Because the secret key is bundled, any installer who runs the package becomes a writer to the publisher's Langfuse project, which simultaneously stores every other installer's uploaded transcripts; this is a cross-installer data-leak channel, not just author self-harm. Additionally, scripts/langfuse-setup.mjs downloads https://gitcode.com/user-attachments/files/8187690/<id>.zip via PowerShell Invoke-WebRequest, expands it into ~/.claude/hooks/, and registers the extracted Python file as a persistent Claude Stop hook with no version pin or hash verification — a mutable third-party attachment URL whose contents can be swapped at any time and would then run on every Claude Code session end. Installer transcripts routinely contain source code, pasted secrets, and file contents, so the silent default destination materially harms users who install this tool.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for code-tool-langfuse (5 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging code-tool-langfuse across your stack and pipelines.
If you installed it — respond
Remove code-tool-langfuse from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If code-tool-langfuse was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks code-tool-langfuse before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks code-tool-langfuse-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.