Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in vitest-preview-pro (npm)

0
Critical
Published: 08/04/2026 (08/04/2026, 23:56:52 UTC)
Source: GCVE Database
Product: vitest-preview-pro

Description

The npm package 'vitest-preview-pro' versions 10.0.3, 10.0.5, 10.0.6, and 10.0.7 contains malicious code masquerading as a Vitest preview utility. Instead of its advertised functionality, it includes a rebranded nodemailer with a preinstall script that launches a detached, silent child process executing attacker-controlled JavaScript fetched from a public JSON hosting service. This allows arbitrary code execution at install time with full require access. The package also includes a large hex-encoded binary payload disguised as a license file. This malicious behavior enables dynamic payload updates via the public JSON endpoint, posing a significant risk to users who install these versions.

Affected software

npmghsa
vitest-preview-pro
Affected versions
=10.0.3=10.0.7=10.0.5=10.0.6

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

AILast updated: 08/07/2026, 15:21:02 UTC

Technical Analysis

The 'vitest-preview-pro' npm package versions 10.0.3, 10.0.5, 10.0.6, and 10.0.7 are malicious. The package contains a preinstall script that runs a detached child process executing obfuscated JavaScript code. This code fetches a JSON payload from api.jsonbin.io, a public and mutable JSON hosting service, and executes the 'record.cookie' field as JavaScript with full require privileges during installation. The package's advertised purpose is a Vitest preview utility, but it actually contains a rebranded nodemailer library with an added dropper. Additionally, a large hex-encoded binary blob is included as a staged secondary payload disguised as a license file. This setup allows attackers to dynamically change the payload delivered to victims at install time.

Potential Impact

Users installing affected versions of 'vitest-preview-pro' are at risk of arbitrary code execution during package installation. The attacker-controlled payload executes with full Node.js require access, enabling potential compromise of the host system, installation of additional malware, data exfiltration, or other malicious activities. The use of a public, mutable JSON hosting service for payload delivery means the malicious code can be updated dynamically, increasing the threat's persistence and adaptability.

Mitigation Recommendations

No official patch or remediation guidance is provided in the available data. Users should immediately avoid installing or using 'vitest-preview-pro' versions 10.0.3, 10.0.5, 10.0.6, and 10.0.7. Remove these versions from any systems where they are installed. Consider auditing your environment for signs of compromise if these versions were used. Monitor official npm advisories or the package maintainer for updates or removal of the malicious package. Until a fix or official guidance is available, do not trust or use this package.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-12004
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a75f709bf8831d53984ec70

Added to database: 08/07/2026, 15:17:29 UTC

Last enriched: 08/07/2026, 15:21:02 UTC

Last updated: 08/07/2026, 15:21:02 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses