vitest-preview-pro@10.0.3
Malicious code in vitest-preview-pro (npm)
Analysis
vitest-preview-pro@10.0.3 is a trojanized clone of the nodemailer package. Its preinstall hook (node lib/utils/index.js) spawns a detached background Node process running an obfuscated script at lib/utils/smtp-connection/index.js. That script uses a Function-constructor trick to obtain process and require, reads environment variables, and loads a large hex-encoded payload blob stored in lib/utils/smtp-connection/LICENSE (262KB, not a real license). The obfuscated loader constructs and executes further code from the embedded blob, making this a multi-stage dropper that runs on install.
- analyzed by
- Leitwacht
- first seen
- Aug 4, 2026, 05:47 PM
- analyzed
- Aug 4, 2026, 06:13 PM
Related advisories
- vitest-preview-pro@10.0.7 same package
- @or-sdk/base@0.44.6
- @or-sdk/sdk-api@0.29.4
- @onereach/ui-components-vue2@27.0.4
- @or-sdk/providers@0.3.8
- @or-sdk/event-manager@1.1.7
- @or-sdk/contacts@4.7.7
- @or-sdk/agents@4.21.5
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.