Malicious code in vitest-preview-pro-all (npm)
The npm package 'vitest-preview-pro-all' version 10.0.3 contains malicious code that executes arbitrary remote code during installation. Its postinstall script runs obfuscated JavaScript which fetches and executes attacker-controlled code from a mutable third-party source. The package impersonates the legitimate 'nodemailer' library to disguise its malicious intent.
AI Analysis
Technical Summary
The 'vitest-preview-pro-all' npm package (version 10.0.3) includes a postinstall script that runs 'lib/utils/index.js', which spawns a detached Node.js child process executing heavily obfuscated code in 'lib/utils/smtp-connection/index.js'. This code performs an axios GET request to a mutable, attacker-controlled URL on jsonbin.io and then executes the fetched payload using a 'new Function' call with 'require' passed in, enabling full Node.js capability and arbitrary remote code execution on the machine installing the package. The package's main file is a copy of the legitimate 'nodemailer' library, used as a cover for the malicious dropper. The fetched payload is not pinned, hashed, or signed, allowing the attacker to change the code at will.
Potential Impact
An attacker can execute arbitrary code with full Node.js privileges on any system that installs the affected package version, potentially leading to complete system compromise. The malicious payload is remotely controlled and can be changed at any time, increasing the risk and unpredictability of the attack. This affects the security and integrity of the installation environment.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing version 10.0.3 of 'vitest-preview-pro-all'. Verify package authenticity before installation and prefer official, trusted sources. Monitor for updates from the package maintainer or npm security advisories for any forthcoming fixes. Consider removing the package if already installed.
Malicious code in vitest-preview-pro-all (npm)
Description
The npm package 'vitest-preview-pro-all' version 10.0.3 contains malicious code that executes arbitrary remote code during installation. Its postinstall script runs obfuscated JavaScript which fetches and executes attacker-controlled code from a mutable third-party source. The package impersonates the legitimate 'nodemailer' library to disguise its malicious intent.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'vitest-preview-pro-all' npm package (version 10.0.3) includes a postinstall script that runs 'lib/utils/index.js', which spawns a detached Node.js child process executing heavily obfuscated code in 'lib/utils/smtp-connection/index.js'. This code performs an axios GET request to a mutable, attacker-controlled URL on jsonbin.io and then executes the fetched payload using a 'new Function' call with 'require' passed in, enabling full Node.js capability and arbitrary remote code execution on the machine installing the package. The package's main file is a copy of the legitimate 'nodemailer' library, used as a cover for the malicious dropper. The fetched payload is not pinned, hashed, or signed, allowing the attacker to change the code at will.
Potential Impact
An attacker can execute arbitrary code with full Node.js privileges on any system that installs the affected package version, potentially leading to complete system compromise. The malicious payload is remotely controlled and can be changed at any time, increasing the risk and unpredictability of the attack. This affects the security and integrity of the installation environment.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing version 10.0.3 of 'vitest-preview-pro-all'. Verify package authenticity before installation and prefer official, trusted sources. Monitor for updates from the package maintainer or npm security advisories for any forthcoming fixes. Consider removing the package if already installed.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13405
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a74cf93bf8831d5391af6d6
Added to database: 08/06/2026, 18:16:51 UTC
Last enriched: 08/06/2026, 18:45:06 UTC
Last updated: 08/06/2026, 22:38:04 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.