Malicious Code Injection in typesens Package - Critical Security Risk
Summary
MAL-2026-17565: Malicious code in typesens (npm). Affects typesens versions 1.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The typesens package is an npm library designed for utility functions, including a zod-based email-domain check. However, it has been found to contain malicious code that executes harmful scripts during installation. This vulnerability poses a significant risk to users who install the package, as it can lead to unauthorized access and control over their systems.
Vulnerability Detail
The vulnerability originates from the package.json file, which includes a postinstall script that executes 'wscript.exe 4444.vbs' upon installation. This script contains a multi-layer decryption mechanism that ultimately drops a malicious payload on the user's system. The payload is disguised as a legitimate telemetry aggregator, but it performs process hollowing using PowerShell, allowing attackers to execute arbitrary code. The obfuscation techniques used in the VBS script, such as randomized function names and XOR-decoding, make detection challenging.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall typesens
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, avoid using the typesens package and consider using alternative libraries that provide similar functionality without the associated risks. Regularly audit your project's dependencies to ensure they are secure.
Conclusion
The discovery of malicious code in the typesens package highlights the importance of vigilance when using open-source libraries. Users should take immediate action to remove the affected package and monitor their systems for any unusual activity. Utilizing tools like Vulert can help maintain the security of your projects.
See every vulnerability recorded for typesens →
FAQ
The typesens package is an npm library intended for utility functions, including email-domain validation. However, it has been compromised with malicious code.
The malicious code executes through a postinstall script in the package.json file, which runs a VBS script that drops harmful payloads on the system.
The risks include unauthorized access to the system, potential data breaches, and the ability for attackers to execute arbitrary code.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
Immediately uninstall the typesens package using 'npm uninstall typesens' and review your project for any other vulnerable dependencies.