Malicious code in tphttprand (PyPI)

tphttprand Updated 02 Oct 2025

Summary

25/02/2023
CRITICAL
No i
Critical
Not published

MAL-2023-7116: Malicious code in tphttprand (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

tphttprand is a package available on PyPI that provides functionality for generating random HTTP headers. It is commonly used in Python applications to simulate HTTP requests. However, this package has been found to contain malicious code that can execute spyware and information-stealing malware.

Vulnerability Detail

The vulnerability in tphttprand originates from a malicious package published by the EsqueleSquad group. This package, identified by the SHA256 hash 0e203608c9d1aa57f05cc1569c8a4b6be07fbc3d433967e203f1db43c864796a, was introduced in version 0 of tphttprand. When this malicious package is installed, it can compromise the security of the system by executing spyware and stealing sensitive information.

How To Fix

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

pip uninstall tphttprand

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 specific workaround mentioned for this vulnerability. However, as a general best practice, it is advisable to regularly review and audit the packages used in your application, and to rely on reputable sources for package installation.

Conclusion

The presence of malicious code in tphttprand poses a significant security risk to systems that have installed the affected package. It is crucial to remove the malicious package and take necessary precautions to ensure the security of your application. For further support and guidance on vulnerability remediation, you can reach out to the Checkmarx supply chain security team at supplychainsecurity@checkmarx.com.

See every vulnerability recorded for tphttprand →

Share this vulnerability

FAQ

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it in real-time to identify any open-source vulnerabilities, including this one.

Yes, you can continue using tphttprand after removing the malicious package. However, it is crucial to ensure that you install a clean and trusted version of tphttprand from a reputable source.

Yes, there are alternative packages available on PyPI that provide similar functionality to tphttprand. It is recommended to search for and evaluate these alternatives to find a package that is not affected by this vulnerability.

The malicious code in tphttprand can execute spyware and steal sensitive information from the system. This can lead to unauthorized access, data breaches, and compromise of user privacy. It is crucial to address this vulnerability promptly to mitigate these risks.

If you have identified this vulnerability or need further support, you can contact the Checkmarx supply chain security team at supplychainsecurity@checkmarx.com. They will be able to assist you with vulnerability remediation and provide additional guidance.

How To Fix

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

pip uninstall tphttprand

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