Malicious code in @sanzoffc/baileys (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4393cd98419ed1fce683c0fde038bce830873769d85d69e64674df61f68502bc) This package is a fork of the Baileys WhatsApp library that adds covert remote-controlled behavior driven by the installer's authenticated WhatsApp session. In lib/Socket/socket.js, socketConnect() (invoked from validateConnection on every WebSocket open) reconstructs a URL from a String.fromCharCode char-code array that resolves to https://raw.githubusercontent.com/skyzopedia/NewsletterID/refs/heads/main/VIP_Push.json, fetches that JSON list, and iterates it to issue WhatsApp GraphQL mutations with query_id 7871414976211147 (newsletter subscribe/follow) for each id in the remote-supplied list. The list is hosted on a mutable personal-GitHub branch controlled by a third party, so whoever edits that file determines which actions the installer's WhatsApp account performs. A second helper (generateMessageV) base64+XOR-decodes (key 23) a hardcoded '@newsletter' JID and pairs it with the same query_id 7871414976211147, then schedules the same subscription action 40 seconds after invocation - layered string obfuscation of a fixed destination JID that has no legitimate purpose in a WhatsApp protocol library. The behavior is not documented, not caller-configurable, and the URL and JID are deliberately obfuscated to evade string scanners. The manifest additionally declares '@whiskeysockets/eslint-config' as an unpinned github: sourc
- Products
- @sanzoffc/baileys
- Affected versions
- 3.0.4
- Fixed versions
- Not specified
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 06:39 UTC · Revision 1
Source evidence
Malicious code in @sanzoffc/baileys (npm)
core-osv · Original sourcePublished 18 Sept 2026, 04:29 UTC
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4393cd98419ed1fce683c0fde038bce830873769d85d69e64674df61f68502bc) This package is a fork of the Baileys WhatsApp library that adds covert remote-controlled behavior driven by the installer's authenticated WhatsApp session. In lib/Socket/socket.js, socketConnect() (invoked from validateConnection on every WebSocket open) reconstructs a URL from a String.fromCharCode char-code array that resolves to https://raw.githubusercontent.com/skyzopedia/NewsletterID/refs/heads/main/VIP_Push.json, fetches that JSON list, and iterates it to issue WhatsApp GraphQL mutations with query_id 7871414976211147 (newsletter subscribe/follow) for each id in the remote-supplied list. The list is hosted on a mutable personal-GitHub branch controlled by a third party, so whoever edits that file determines which actions the installer's WhatsApp account performs. A second helper (generateMessageV) base64+XOR-decodes (key 23) a hardcoded '@newsletter' JID and pairs it with the same query_id 7871414976211147, then schedules the same subscription action 40 seconds after invocation - layered string obfuscation of a fixed destination JID that has no legitimate purpose in a WhatsApp protocol library. The behavior is not documented, not caller-configurable, and the URL and JID are deliberately obfuscated to evade string scanners. The manifest additionally declares '@whiskeysockets/eslint-config' as an unpinned github: sourc
osv:MAL-2026-16281
@sanzoffc/baileys
Fixed versions: Not specified
Complete source record
{
"id": "2b8c0faa2e81e63b954e54c1691d52821828d652e4a8244afb4d5f03ad52c9a8",
"url": "https://osv.dev/vulnerability/MAL-2026-16281",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Malicious code in @sanzoffc/baileys (npm)",
"summary": "--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (4393cd98419ed1fce683c0fde038bce830873769d85d69e64674df61f68502bc) This package is a fork of the Baileys WhatsApp library that adds covert remote-controlled behavior driven by the installer's authenticated WhatsApp session. In lib/Socket/socket.js, socketConnect() (invoked from validateConnection on every WebSocket open) reconstructs a URL from a String.fromCharCode char-code array that resolves to https://raw.githubusercontent.com/skyzopedia/NewsletterID/refs/heads/main/VIP_Push.json, fetches that JSON list, and iterates it to issue WhatsApp GraphQL mutations with query_id 7871414976211147 (newsletter subscribe/follow) for each id in the remote-supplied list. The list is hosted on a mutable personal-GitHub branch controlled by a third party, so whoever edits that file determines which actions the installer's WhatsApp account performs. A second helper (generateMessageV) base64+XOR-decodes (key 23) a hardcoded '@newsletter' JID and pairs it with the same query_id 7871414976211147, then schedules the same subscription action 40 seconds after invocation - layered string obfuscation of a fixed destination JID that has no legitimate purpose in a WhatsApp protocol library. The behavior is not documented, not caller-configurable, and the URL and JID are deliberately obfuscated to evade string scanners. The manifest additionally declares '@whiskeysockets/eslint-config' as an unpinned github: sourc",
"evidence": "osv:MAL-2026-16281",
"products": [
{
"name": {
"value": "@sanzoffc/baileys",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.0.4",
"evidence": "/affected/0/versions"
}
]
}
],
"severity": "unknown",
"structured": {
"id": "MAL-2026-16281",
"aliases": [
"GHSA-w5cc-9p38-q2wq",
"MAL-2026-16281"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "@sanzoffc/baileys",
"purl": "pkg:npm/%40sanzoffc/baileys",
"ecosystem": "npm"
},
"versions": [
"3.0.4"
],
"database_specific": {
"cwes": [
{
"name": "Embedded Malicious Code",
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature."
},
{
"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/@sanzoffc/baileys/MAL-2026-16281.json",
"indicators": {
"evidence_files": [
{
"path": "lib/Socket/socket.js",
"tlsh": "ffd2b41b46f3053aab777476562b6021333580073a48dca57bac8254af8e778e6e77cc",
"sha256": "ea57a6770cf2c246e27a5ffe85ffeb496624f9b1582868d5dff184fd6369a394"
},
{
"path": "package.json",
"tlsh": "f541ee21cfae4d3314da2585e9a5900265a809f3be487c2c7394967c4f4e25f27be8ed",
"sha256": "c133372660768c7345c90deac3371900a7ee0879d56082fd6f6f40fd7ea605f7"
}
],
"package_integrity": [
{
"hashes": {
"sha1": "b1b8fe6ee997780989e23290233629da98dca16d",
"sha512_sri": "sha512-prWbJsDnAnMsugsWjA9VR0Kx7JQ5y0y87ze+VO1sGwll/kBIsTvkQI7lMiq6/0SWDs5GJAIr77A8BHCg72G5JQ=="
},
"filename": "baileys-3.0.4.tgz"
}
]
}
}
}
],
"modified": "2026-10-12T16:45:07.597411522Z",
"provider": "osv",
"references": [
"https://www.npmjs.com/package/@sanzoffc/baileys/v/3.0.4",
"https://github.com/advisories/GHSA-w5cc-9p38-q2wq"
],
"provider_metadata": {
"malicious-packages-origins": [
{
"id": "IN-MAL-2026-020178",
"sha256": "4393cd98419ed1fce683c0fde038bce830873769d85d69e64674df61f68502bc",
"source": "amazon-inspector",
"versions": [
"3.0.4"
],
"import_time": "2026-09-18T04:43:03.710609626Z",
"modified_time": "2026-09-18T04:29:33Z"
},
{
"id": "GHSA-w5cc-9p38-q2wq",
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"sha256": "5e518551b202e71d22a3dd3916d6b86696c778ef910311e7bb6867c1c0b171f5",
"source": "ghsa-malware",
"import_time": "2026-10-12T16:30:26.96410214Z",
"modified_time": "2026-10-12T15:54:54Z"
}
]
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 300058,
"published_at": "2026-09-18T04:29:33+00:00"
}