Malicious Code Injection in gztensor-cli: A Critical Security Threat
Summary
MAL-2026-53: Malicious code in gztensor-cli (PyPI). Affects gztensor-cli versions 0.0.1 – 0.1.2. 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
gztensor-cli is a Python package available on PyPI that is designed to provide command-line tools for working with tensor data structures. It aims to simplify the manipulation and analysis of tensor data for developers and researchers. However, a recent vulnerability has been discovered in version 0.1.1, where the package has been compromised by malicious actors who have introduced harmful code that can lead to severe security breaches.
Vulnerability Detail
The vulnerability originates from a malicious code injection in the gztensor-cli package, specifically in version 0.1.1. This version clones a legitimate library but adds hidden code that downloads a malicious script. The script subsequently retrieves an archive containing a malicious executable tailored to the system architecture. This executable is designed to establish persistence on the infected system by creating automatically started service entries. The malicious code is identified as a Go-based infostealer and backdoor, linked to North Korean cybercrime activities. The implications of this vulnerability are severe, as it can lead to unauthorized access to sensitive information and control over the affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall gztensor-cli
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
If you are unable to update the package immediately, a temporary workaround is to remove the gztensor-cli package from your environment using the command: pip uninstall gztensor-cli. This will prevent any malicious code from executing until you can safely update to a secure version.
Conclusion
The gztensor-cli package has been identified as containing malicious code that poses significant security risks. Users are urged to update to a secure version immediately or uninstall the package to mitigate potential threats. Utilizing tools like Vulert can help monitor for such vulnerabilities in the future.
See every vulnerability recorded for gztensor-cli →
FAQ
gztensor-cli is a Python package that provides command-line tools for manipulating and analyzing tensor data structures.
The package was compromised by cloning a legitimate library and injecting malicious code that downloads harmful scripts and executables.
The risks include unauthorized access to sensitive data, system control by malicious actors, and potential data breaches.
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.
If you cannot update the package, you should uninstall gztensor-cli to prevent any malicious code from executing.