Malicious Code Vulnerability in rehttps Package - PyPI
Summary
MAL-2025-6575: Malicious code in rehttps (PyPI). Affects rehttps versions 2.32.3 – 2.32.4. 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 rehttps package is a Python library designed to facilitate the handling of HTTP requests and responses, providing users with tools to manage and manipulate web traffic effectively. It is commonly used in various applications that require web scraping, API interactions, or automated web testing. However, recent findings have revealed that certain versions of this package contain malicious code, posing significant security risks to users and their applications.
Vulnerability Detail
The vulnerability identified in the rehttps package stems from the inclusion of malicious code in versions 2.32.3 and 2.32.4. This code can potentially compromise the integrity of applications that utilize the package, leading to unauthorized access, data breaches, or other malicious activities. The origin of this vulnerability is linked to a malicious actor who has manipulated the package repository, making it crucial for users to be vigilant about the packages they install.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall rehttps
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 measure, users can avoid using the affected versions of rehttps (2.32.3 and 2.32.4) and revert to an earlier version that does not contain the malicious code. For example, you can install version 2.32.2 using the command:
pip install rehttps==2.32.2
Conclusion
The rehttps package has been found to contain malicious code in specific versions, posing a serious threat to users. It is imperative to update to a secure version to mitigate risks. Users are encouraged to monitor their dependencies for vulnerabilities using tools like Vulert.
See every vulnerability recorded for rehttps →
FAQ
The affected versions of the rehttps package are 2.32.3 and 2.32.4.
You can check your application's Pipfile.lock to see if it includes rehttps version 2.32.3 or 2.32.4.
Using the affected versions can lead to unauthorized access, data breaches, and other malicious activities within your application.
Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software without requiring access to the code or installation.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.