Malicious Baileys npm forks: unpinned libsignal dependency lets third party run code on install
Severity: critical · Patch status: no-fix-needed · Since 2026-11-23
Two npm Baileys forks, @xz-bails/baileys 6.0.10/6.0.11 and @iky-zan/baileys 0.1.0, declare libsignal as github:tenka-san/libsignal-node without a commit SHA, tag, or integrity pin. On npm install, npm resolves the mutable HEAD of that personal GitHub repository, installs it, and may execute its lifecycle scripts on the installer’s machine. Because tenka-san is outside the publishing scopes, a third party controls code that runs during installation, including a transitive providing cryptographic/signal-protocol functionality. GitHub Advisory Database rates both critical and lists no patched versions. No in-the-wild exploitation is stated. Affected users should remove the packages, block the dependency, and treat installs as potentially compromised.
What to do
- Immediately remove @xz-bails/baileys and @iky-zan/baileys from projects and CI; block github:tenka-san/libsignal-node at the registry/proxy and in lockfiles.
- Treat any environment that installed affected versions as potentially compromised: isolate/rebuild hosts, review npm lifecycle-script execution, and rotate credentials/secrets accessible during install.
- Audit lockfiles and SBOMs for git dependencies without commit SHAs or integrity hashes; pin any required git dependency to an immutable commit and verify provenance.
- Monitor npm/GitHub advisory feeds and package download logs for these package names and the tenka-san repository.
Sources
All live incidents on Threat Watch