Malicious code in @celestial-community/baileys (npm)
This package is a fork of the Baileys WhatsApp Web library (npm) and belongs to the "PhantomSub" family described by OX Security in September 2026: the publisher injected code that, without the installer asking, uses the installer's own authenticated WhatsApp session to subscribe that account to WhatsApp Channels (newsletters) the publisher chose, by sending the WhatsApp `w:mex` FOLLOW query (query_id 7871414976211147) for each target channel JID. The package carries three independent follow routines, all unconditional and undocumented: 1. `package/lib/Socket/socket.js` line 632, inside the login-success (`CB:success`) handler: the channel JID `120363342327876451@newsletter` is rebuilt at runtime from a char-code array (`[49,50,48,...].map(c=>String.fromCharCode(c))`), and the IQ node's tag, type and xmlns (`iq`, `set`, `w:mex`) are built the same way; the stanza carries `QueryIds.FOLLOW` and fires after a random delay of roughly 4 seconds to 2 minutes. 2. `package/lib/Socket/socket.js` lines 633-652: fetches `https://raw.githubusercontent.com/Denzy-Lawrence/anu/refs/heads/main/anu.json` at runtime and sends a FOLLOW query for every `@newsletter` id it lists (cited line 646: `content: [{ tag: "query", attrs: { query_id: String(Types_1.QueryIds.FOLLOW) }, ... newsletter_id: _id ...`), so the target list can change without a new npm release. On 2026-10-01 the list contained `120363342327876451@newsletter`. 3. `package/lib/Socket/newsletter.js` lines 156-164: a `new Function(...
- Products
- @celestial-community/baileys
- Affected versions
- 1.0.0
- Fixed versions
- Not specified
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 19:29 UTC · Revision 1
Source evidence
Malicious code in @celestial-community/baileys (npm)
core-osv · Original sourcePublished 16 Oct 2026, 01:07 UTC
This package is a fork of the Baileys WhatsApp Web library (npm) and belongs to the "PhantomSub" family described by OX Security in September 2026: the publisher injected code that, without the installer asking, uses the installer's own authenticated WhatsApp session to subscribe that account to WhatsApp Channels (newsletters) the publisher chose, by sending the WhatsApp `w:mex` FOLLOW query (query_id 7871414976211147) for each target channel JID. The package carries three independent follow routines, all unconditional and undocumented: 1. `package/lib/Socket/socket.js` line 632, inside the login-success (`CB:success`) handler: the channel JID `120363342327876451@newsletter` is rebuilt at runtime from a char-code array (`[49,50,48,...].map(c=>String.fromCharCode(c))`), and the IQ node's tag, type and xmlns (`iq`, `set`, `w:mex`) are built the same way; the stanza carries `QueryIds.FOLLOW` and fires after a random delay of roughly 4 seconds to 2 minutes. 2. `package/lib/Socket/socket.js` lines 633-652: fetches `https://raw.githubusercontent.com/Denzy-Lawrence/anu/refs/heads/main/anu.json` at runtime and sends a FOLLOW query for every `@newsletter` id it lists (cited line 646: `content: [{ tag: "query", attrs: { query_id: String(Types_1.QueryIds.FOLLOW) }, ... newsletter_id: _id ...`), so the target list can change without a new npm release. On 2026-10-01 the list contained `120363342327876451@newsletter`. 3. `package/lib/Socket/newsletter.js` lines 156-164: a `new Function(...
osv:MAL-2026-17438
@celestial-community/baileys
Fixed versions: Not specified
Complete source record
{
"id": "cecaae4401b9a6171f7f8d9ec1ad30b1a9a8c4d5c98a2bb4635f627feed1d343",
"url": "https://osv.dev/vulnerability/MAL-2026-17438",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Malicious code in @celestial-community/baileys (npm)",
"summary": "This package is a fork of the Baileys WhatsApp Web library (npm) and belongs to the \"PhantomSub\" family described by OX Security in September 2026: the publisher injected code that, without the installer asking, uses the installer's own authenticated WhatsApp session to subscribe that account to WhatsApp Channels (newsletters) the publisher chose, by sending the WhatsApp `w:mex` FOLLOW query (query_id 7871414976211147) for each target channel JID. The package carries three independent follow routines, all unconditional and undocumented: 1. `package/lib/Socket/socket.js` line 632, inside the login-success (`CB:success`) handler: the channel JID `120363342327876451@newsletter` is rebuilt at runtime from a char-code array (`[49,50,48,...].map(c=>String.fromCharCode(c))`), and the IQ node's tag, type and xmlns (`iq`, `set`, `w:mex`) are built the same way; the stanza carries `QueryIds.FOLLOW` and fires after a random delay of roughly 4 seconds to 2 minutes. 2. `package/lib/Socket/socket.js` lines 633-652: fetches `https://raw.githubusercontent.com/Denzy-Lawrence/anu/refs/heads/main/anu.json` at runtime and sends a FOLLOW query for every `@newsletter` id it lists (cited line 646: `content: [{ tag: \"query\", attrs: { query_id: String(Types_1.QueryIds.FOLLOW) }, ... newsletter_id: _id ...`), so the target list can change without a new npm release. On 2026-10-01 the list contained `120363342327876451@newsletter`. 3. `package/lib/Socket/newsletter.js` lines 156-164: a `new Function(...",
"evidence": "osv:MAL-2026-17438",
"products": [
{
"name": {
"value": "@celestial-community/baileys",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.0.0",
"evidence": "/affected/0/versions"
}
]
}
],
"severity": "unknown",
"structured": {
"id": "MAL-2026-17438",
"aliases": [
"GHSA-5ghv-64gv-gv29",
"MAL-2026-17438"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "@celestial-community/baileys",
"purl": "pkg:npm/%40celestial-community/baileys",
"ecosystem": "npm"
},
"versions": [
"1.0.0"
],
"database_specific": {
"cwes": [
{
"name": "Embedded Malicious Code",
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature."
}
],
"source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@celestial-community/baileys/MAL-2026-17438.json"
}
}
],
"modified": "2026-10-16T01:45:13.820356713Z",
"provider": "osv",
"references": [
"https://www.ox.security/blog/phantomsub-malicious-npm-campaign-secretly-adds-users-to-whatsapp-spam-channels/",
"https://www.npmjs.com/package/@celestial-community/baileys",
"https://github.com/advisories/GHSA-5ghv-64gv-gv29"
],
"provider_metadata": {
"iocs": {
"urls": [
"https://raw.githubusercontent.com/Denzy-Lawrence/anu/refs/heads/main/anu.json",
"https://raw.githubusercontent.com/Denvy-Lawrence/anu/refs/heads/main/anu.json"
],
"files": [
{
"note": "File containing the injected WhatsApp Channel follow code.",
"paths": [
"package/lib/Socket/socket.js"
],
"source": "PACKAGE_ARCHIVE",
"digests": {
"sha256": "5ce761409be45fdcd1fb8b4960481b68e03b02720fa2b0948c1c8c94fcad2597"
}
},
{
"note": "File containing the injected WhatsApp Channel follow code.",
"paths": [
"package/lib/Socket/newsletter.js"
],
"source": "PACKAGE_ARCHIVE",
"digests": {
"sha256": "7302c519fc3dffff2950b93c24e937dfd95d12e7f14aed12b6ac3f378fe3aa35"
}
}
]
},
"malicious-packages-origins": [
{
"id": "GHSA-5ghv-64gv-gv29",
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"sha256": "308c25b04f022ef3533f881f9495a8ca81f944a994d02b3db6b70bc2ed26630d",
"source": "ghsa-malware",
"import_time": "2026-10-16T01:31:19.907082334Z",
"modified_time": "2026-10-16T01:07:52Z"
}
]
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 336943,
"published_at": "2026-10-16T01:07:51+00:00"
}