@merceas npm packages (rpc-websockets, cross-fetch, anchor) are malware: remove and rotate secrets
Severity: critical · Patch status: no-fix-needed · Since 2026-06-21
Three npm packages in the @merceas scope (rpc-websockets, cross-fetch, anchor) are malicious lookalikes of the popular libraries of the same names, not hijacks of those libraries. The unscoped rpc-websockets and cross-fetch packages have no malware records, and the registry shows their original publishers on their latest releases (mkozjak for rpc-websockets 10.0.1, lquixada for cross-fetch 4.1.0; checked for latest releases only). OSV records MAL-2026-20132, MAL-2026-6510 and MAL-2026-6509 and GitHub advisories GHSA-9pjm-78xx-c2pq, GHSA-pc7w-ch55-9pff and GHSA-8x6x-x6v6-434r classify the packages as malicious. OSV's cross-fetch record describes a copy of the upstream README and metadata, with obfuscated code that, when the module is required, decrypts a runtime-built URL, downloads a payload, makes it executable and runs it. OSV's anchor record describes a copy of @coral-xyz/anchor's README and a dependency alias that pulls in the malicious @merceas/cross-fetch. The registry publish times put the malicious releases on 2026-06-21 and 2026-06-22 (rpc-websockets 9.3.11 and 9.3.12, cross-fetch 3.1.9 and 3.1.12, anchor 0.32.1 and 0.32.3). On 2026-11-18 npm replaced each scope package with a security-holding placeholder. Downloads for 2026-10-19 to 2026-11-17 were 27 (rpc-websockets), 570 (cross-fetch) and 353 (anchor), a small but real reach; the earlier record's ~26 figure was for one package and the cross-fetch and anchor counts were not stated. GitHub's guidance is that any machine that installed or ran these packages should be treated as fully compromised, with secrets rotated from a clean machine and the packages removed, though removal may not clear every payload.
What to do
- Remove @merceas/rpc-websockets, @merceas/cross-fetch and @merceas/anchor from every machine, CI runner and build image; a lockfile entry for @merceas/cross-fetch 3.1.9 or 3.1.12 is the same finding
- Search lockfiles and dependency trees for the @merceas scope and for npm aliases pointing into it, including the cross-fetch alias inside @merceas/anchor
- Rotate all secrets, keys and tokens that were on or reachable from an affected machine, rotating from a different, clean computer
- Rebuild affected systems from trusted images; do not assume uninstalling the package removed the payload
- Reinstall rpc-websockets, cross-fetch and @coral-xyz/anchor from their own namespaces, and block the @merceas npm scope in registry proxies and dependency firewalls
Sources
All live incidents on Threat Watch