MAL-2026-10109: Malicious code in validator-string (npm)
The validator-string npm package is a malicious typosquatting package impersonating the legitimate validator package. It contains obfuscated code that executes automatically both on installation and when required, enabling remote code execution with full Node.js privileges. The package uses dynamic code construction from an encoded payload to run arbitrary code, posing a severe security risk to any system that installs or loads it.
AI Analysis
Technical Summary
The validator-string package is a malicious npm package that mimics the legitimate validator package by copying its README, homepage, and API surface. Its package.json defines a postinstall script that runs node index.js, and the main entry also points to index.js, which contains an obfuscated block of code. This code reconstructs core Node.js identifiers such as require, module, __dirname, __filename, and constructor through a multi-stage character shuffle. It then exposes these identifiers globally and dynamically constructs and executes a function from an encoded payload. This results in automatic execution of potentially harmful code both during installation and runtime, effectively enabling installer-side remote code execution with full Node privileges. The combination of typosquatting, cloned metadata, obfuscation, and dual automatic execution points clearly indicates malicious intent.
Potential Impact
This malicious package allows arbitrary code execution with full Node.js privileges on any system that installs or requires it. This can lead to complete compromise of the host environment, including data theft, system manipulation, or further malware deployment. The threat is severe given the automatic execution on install and load, and the full Node.js capability granted to the payload.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package. The best mitigation is to avoid installing or using the validator-string package. Users should verify package names carefully to avoid typosquatting attacks and rely only on the official validator package from trusted sources. Monitoring package dependencies and using tools that detect typosquatting or malicious packages can help prevent accidental installation.
MAL-2026-10109: Malicious code in validator-string (npm)
Description
The validator-string npm package is a malicious typosquatting package impersonating the legitimate validator package. It contains obfuscated code that executes automatically both on installation and when required, enabling remote code execution with full Node.js privileges. The package uses dynamic code construction from an encoded payload to run arbitrary code, posing a severe security risk to any system that installs or loads it.
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 validator-string package is a malicious npm package that mimics the legitimate validator package by copying its README, homepage, and API surface. Its package.json defines a postinstall script that runs node index.js, and the main entry also points to index.js, which contains an obfuscated block of code. This code reconstructs core Node.js identifiers such as require, module, __dirname, __filename, and constructor through a multi-stage character shuffle. It then exposes these identifiers globally and dynamically constructs and executes a function from an encoded payload. This results in automatic execution of potentially harmful code both during installation and runtime, effectively enabling installer-side remote code execution with full Node privileges. The combination of typosquatting, cloned metadata, obfuscation, and dual automatic execution points clearly indicates malicious intent.
Potential Impact
This malicious package allows arbitrary code execution with full Node.js privileges on any system that installs or requires it. This can lead to complete compromise of the host environment, including data theft, system manipulation, or further malware deployment. The threat is severe given the automatic execution on install and load, and the full Node.js capability granted to the payload.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package. The best mitigation is to avoid installing or using the validator-string package. Users should verify package names carefully to avoid typosquatting attacks and rely only on the official validator package from trusted sources. Monitoring package dependencies and using tools that detect typosquatting or malicious packages can help prevent accidental installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10109
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50ba4168715ace4357e311
Added to database: 07/10/2026, 09:24:17 UTC
Last enriched: 07/10/2026, 09:35:05 UTC
Last updated: 07/10/2026, 09:35:05 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.