Malicious code in toolrand (PyPI)

toolrand Updated 02 Oct 2025

Summary

25/02/2023
CRITICAL
No i
Critical
Not published

MAL-2023-6895: Malicious code in toolrand (PyPI). Affected versions are not published. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The toolrand package is an open-source Python package available on PyPI. It is designed to provide randomization and generation of various data types, such as numbers, strings, and dates. The package is commonly used in data analysis, simulation, and testing applications. However, the package has been found to contain malicious code, which poses a significant security risk to users who install and use it.

Vulnerability Detail

The toolrand package has been compromised by the EsqueleSquad group, who published nearly 6000 malicious PyPi and NPM packages. These packages execute spyware and information-stealing malware. The specific vulnerability in toolrand allows the execution of arbitrary code on the user's system, leading to potential data breaches, unauthorized access, and other malicious activities. The malicious code can be triggered when using certain functions or methods provided by the package.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall toolrand

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

There is no known workaround for this vulnerability. It is essential to remove the toolrand package entirely from your Python environment to mitigate the risk of exploitation.

Conclusion

The toolrand package available on PyPI has been found to contain malicious code, posing a significant security risk to users. It is crucial to immediately remove the package from your Python environment and take necessary steps to ensure system security. Regularly updating antivirus software and monitoring for any unusual activities can help mitigate the risk of exploitation. If you require further assistance or have any questions, please reach out to DevNack.com for support on vulnerability remediation.

See every vulnerability recorded for toolrand →

Share this vulnerability

FAQ

You can check if the toolrand package is installed in your Python environment by running the following command:

pip show toolrand

If the package is installed, it will display information about the package. If the package is not found, it means it is not installed.

The potential consequences of this vulnerability include unauthorized access to sensitive data, data breaches, installation of additional malware or spyware, and compromise of the affected system.

While it is challenging to detect if your system has been compromised by the toolrand package, you can perform a thorough system scan using up-to-date antivirus software. Additionally, monitoring for any unusual or suspicious activities on your system can help identify potential compromises.

Yes, there are several alternative packages available on PyPI that provide similar functionality to toolrand. Some popular alternatives include random, numpy, and faker. It is recommended to carefully review the documentation and user reviews of alternative packages before making a decision.

If you have identified the toolrand package as being compromised or have any further questions or concerns, you can report the vulnerability to the package maintainers or seek assistance from security experts. You can also reach out to info@devnack.com for further support on vulnerability remediation.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall toolrand

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback