Malicious code in tppygetrandom (PyPI)

tppygetrandom Updated 02 Oct 2025

Summary

25/02/2023
CRITICAL
No i
Critical
Not published

MAL-2023-7457: Malicious code in tppygetrandom (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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

tppygetrandom is a package available on PyPI that provides functionality for generating random numbers. It is commonly used in Python projects for various purposes. However, this package has been found to contain malicious code, which can lead to the execution of spyware and information-stealing malware.

Vulnerability Detail

The vulnerability in tppygetrandom arises from the inclusion of malicious code in the package. This code can be triggered during the execution of the package, allowing attackers to gain unauthorized access to sensitive information or perform malicious activities on the affected system. The malicious code has been identified and reported by the Checkmarx security group. It is crucial to address this vulnerability promptly to prevent any potential harm to systems using tppygetrandom.

How To Fix

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

pip uninstall tppygetrandom

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 →

Conclusion

The presence of malicious code in tppygetrandom poses a significant security risk to Python projects using this package. It is crucial to take immediate action to remove the affected version and replace it with a trusted version. Regularly updating and monitoring your project's dependencies can help mitigate the risk of using compromised packages. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tppygetrandom →

Share this vulnerability

FAQ

You can check your project's dependencies and look for the affected version of tppygetrandom. If it is present, it is recommended to remove it and replace it with a trusted version.

Using the malicious version of tppygetrandom can lead to the execution of spyware and information-stealing malware. This can result in unauthorized access to sensitive information, compromise of user data, and potential harm to the affected system.

At the moment, there is no specific workaround available for this vulnerability. The best course of action is to remove the affected version of tppygetrandom and replace it with a trusted version.

To ensure the security of your Python project's dependencies, it is recommended to regularly update them to the latest versions. Additionally, you can use tools like Vulert to monitor and alert for open-source vulnerabilities in your software.

For more information about this vulnerability and its impact, you can refer to the Checkmarx security group's report and the associated GitHub repository for malicious packages.

How To Fix

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

pip uninstall tppygetrandom

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