Skip to main content

Malicious code in eslint-plugin-vitest-ts (npm)

0
Critical
Published: 08/05/2026 (08/05/2026, 12:33:24 UTC)
Source: GCVE Database
Product: eslint-plugin-vitest-ts

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (a354edd3ce58afcb537f1e58b5152244cc6a98c6b0462de297262d9aba4e17d3) The package declares itself as an ESLint plugin but ships copies of nodemailer's source layout along with an obfuscated install-time loader. package.json's postinstall hook runs `node lib/utils/index.js`, which spawns a detached child process executing lib/utils/smtp-connection/index.js. That file uses obfuscator.io-style string-array indirection (`_0x438c`, `_0x926305`, etc.) to hide a call that fetches JSON from https://api.jsonbin.io/v3/b/6a72aa2bda38895dfebb1302 and passes the returned `record.cookie` string to `new Function('require', <fetched>)(require)`. The fetched content is attacker-controlled and mutable, and it executes in-process with `require` injected, giving arbitrary code execution on any machine that runs `npm install` for this package. The name `eslint-plugin-vitest-ts` is unrelated to the shipped nodemailer-shaped source, indicating a lure/typosquat. ## Source: ghsa-malware (24c2db5f1e6400e1a774b0a542c8cb8cd6aad001e80068c6aeb97ebc6af3c2d0) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Affected software

npmghsa
eslint-plugin-vitest-ts
Affected versions
=1.0.4

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/05/2026, 17:38:35 UTC

Technical Analysis

The eslint-plugin-vitest-ts npm package version 1.0.4 declares itself as an ESLint plugin but ships with obfuscated code resembling nodemailer's source layout. Its postinstall script runs a node process that executes obfuscated code which fetches JSON data from a remote URL. The fetched data includes a 'record.cookie' string that is executed as JavaScript code with require injected, allowing attacker-controlled arbitrary code execution during npm install. The package name is unrelated to the shipped code, indicating a typosquatting attempt to lure victims.

Potential Impact

Any system running npm install on eslint-plugin-vitest-ts version 1.0.4 is vulnerable to arbitrary code execution due to the malicious postinstall script. This can lead to full compromise of the affected machine, data theft, or further malware deployment. The attacker controls the remote payload, allowing dynamic and potentially evolving malicious behavior.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should avoid installing eslint-plugin-vitest-ts version 1.0.4. Verify package authenticity before installation and prefer official, well-maintained packages. Monitor for updates from the package maintainer or npm advisories for remediation. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for current remediation guidance.

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-12370
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6a735747bf8831d53915a0c2

Added to database: 08/05/2026, 15:31:19 UTC

Last enriched: 08/05/2026, 17:38:35 UTC

Last updated: 09/07/2026, 23:17:50 UTC

Views: 23

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