Malicious code in eslint-plugin-vitest-ts (npm)
The npm package eslint-plugin-vitest-ts version 1.0.4 contains malicious code that executes arbitrary commands during installation. It masquerades as an ESLint plugin but includes obfuscated code that fetches attacker-controlled JavaScript from a remote server and executes it with injected require access. This results in arbitrary code execution on any machine running npm install for this package. The package appears to be a typosquat lure unrelated to its declared functionality.
AI Analysis
Technical Summary
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.
Malicious code in eslint-plugin-vitest-ts (npm)
Description
The npm package eslint-plugin-vitest-ts version 1.0.4 contains malicious code that executes arbitrary commands during installation. It masquerades as an ESLint plugin but includes obfuscated code that fetches attacker-controlled JavaScript from a remote server and executes it with injected require access. This results in arbitrary code execution on any machine running npm install for this package. The package appears to be a typosquat lure unrelated to its declared functionality.
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 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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12370
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a735747bf8831d53915a0c2
Added to database: 08/05/2026, 15:31:19 UTC
Last enriched: 08/05/2026, 17:38:35 UTC
Last updated: 08/05/2026, 17:38:35 UTC
Views: 2
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.