MAL-2026-20107: Malicious code in vant (npm)
Ten versions of vant were published on 2024-12-19 between 00:41:47Z and 01:49:30Z by the npm user landluck, using npm 9.2.0: 4.9.11, 2.13.3, 3.6.13, 4.9.12, 3.6.14, 2.13.4, 4.9.13, 4.9.14, 3.6.15 and 2.13.5. Each one adds an install hook, "postinstall": "node lib/utils/support.js", which no earlier release of vant had. Clean releases by the maintainer followed from 02:20:40Z the same day (4.9.15, 3.6.16, 2.13.6). The ten versions are deprecated on the registry with the message "Contains security vulnerabilities, do not use" but remain installable.
Content (all ten tarballs read statically, integrity matching the registry; nothing was executed): every version is the clean 4.9.10 build with every other file byte-identical to 4.9.10, package.json "version" set to the target number, the postinstall hook added, and one added file, lib/utils/support.js. The 2.13.x and 3.6.x versions therefore ship 4.x code under 2.x and 3.x numbers. lib/utils/support.js is a single obfuscated line in two builds: - sha256 92c486bcc03a68b5b0b914417bca063bf40ad08db246a1c3f11bb8999afedf43, 609,615 bytes: 4.9.11, 2.13.3, 3.6.13 - sha256 b91f82dc09bae8c3e72e4cf8f6778a8530417bf5fed3a7e2df49e8b85950eb85, 609,441 bytes: 4.9.12, 3.6.14, 2.13.4, 4.9.13, 4.9.14, 3.6.15, 2.13.5
The script uses childprocess and writes and marks files executable. Strings in both builds: the XMRig 6.22.2 linux-static-x64 release download from github.com, the endpoint 80.78.28.72/tokens (https in the first build, http in the second), an IP lookup at ipinfo.io/json, the GitHub API path api.github.com/repos/youzan/vant/git/blobs/, and the local paths /tmp/vanthelper and /tmp/xmrig. Classification: cryptocurrency miner dropper run from an install hook.
This compromise was reported publicly on the same day, in the vant maintainers' notice (youzan/vant discussion #13273, 2024-12-19T01:39Z) and in vendor write-ups such as Sonatype's, which lists the same ten versions. ossf/malicious-packages issue #1628 asks for a record for eight of them; this record adds 4.9.11 and 3.6.15. At the time of writing no malware record for these versions exists in OSV or the GitHub Advisory Database.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/vantto a version that resolves this vulnerability.Fixed in 4.9.15 - Upgrade
Upgrade
npm/vantto a version that resolves this vulnerability.Fixed in 3.6.16 - Upgrade
Upgrade
npm/vantto a version that resolves this vulnerability.Fixed in 2.13.6
Event History
Frequently Asked Questions
Which installations should be treated as exposed?
Any installation that used one of these versions should be treated as exposed: 4.9.11, 2.13.3, 3.6.13, 4.9.12, 3.6.14, 2.13.4, 4.9.13, 4.9.14, 3.6.15, or 2.13.5. Each contains a postinstall hook that runs lib/utils/support.js during installation.
How can I check whether one of the malicious releases is present?
Check dependency manifests, lockfiles, and installed package metadata for any of the ten affected version numbers. An installed affected package has a package.json postinstall entry of "node lib/utils/support.js" and includes lib/utils/support.js.
What should be used instead if an affected version is pinned?
Replace affected 4.x, 3.x, and 2.x releases with the clean maintainer releases 4.9.15, 3.6.16, and 2.13.6, respectively. The affected versions remain installable despite being deprecated in the registry.
Is this only an unwanted install script, or is the package content also incorrect?
The affected 2.13.x and 3.6.x packages contain the 4.9.10 build while declaring 2.x or 3.x version numbers. Apart from the changed version field, added postinstall hook, and added support.js file, the tarballs were byte-identical to the clean 4.9.10 build.