Malicious Code Detected in tiny-viewport-unit-calc Package - Host Reconnaissance and Data Exfiltration
Summary
MAL-2026-17528: Malicious code in tiny-viewport-unit-calc (npm). Affects tiny-viewport-unit-calc 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 tiny-viewport-unit-calc package is a Node.js library designed to calculate viewport units in a simple manner. It is intended for developers who need to manage responsive designs effectively. However, this package has been compromised, containing malicious code that executes unauthorized commands, posing significant security risks to users.
Vulnerability Detail
The vulnerability originates from the inclusion of a malicious module named thunderboltRegistry.js within the tiny-viewport-unit-calc package. This module utilizes Node's child_process to execute system commands like 'whoami' and repeatedly pings external hostnames. The behavior indicates host reconnaissance and potential data exfiltration, as it sends sensitive information from the user's machine to an external server. This malicious activity is unrelated to the package's intended functionality, making it a severe security threat.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall tiny-viewport-unit-calc
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, you can avoid using the tiny-viewport-unit-calc package altogether and look for alternative libraries that provide similar functionality without the security risks. Additionally, you can monitor your application for vulnerabilities using tools like Vulert, which can analyze your package-lock.json file for potential threats.
Conclusion
The tiny-viewport-unit-calc package has been compromised with malicious code that poses significant security risks. Users are advised to remove the package and monitor their applications for vulnerabilities. Utilizing tools like Vulert can help in identifying and managing such threats effectively.
See every vulnerability recorded for tiny-viewport-unit-calc →
FAQ
It is a Node.js library designed to help developers calculate viewport units for responsive web design.
The package executes system commands and sends sensitive information to external servers, indicating host reconnaissance and data exfiltration.
You can use the Vulert playground at Vulert Scanner to analyze your package-lock.json file for vulnerabilities without requiring any signup.
Currently, there is no patched version available. It is recommended to remove the package until a secure version is released.
You should uninstall the tiny-viewport-unit-calc package immediately and consider using alternative libraries for viewport calculations.