Security Vulnerability in python3-requests: .netrc Credentials Leak
Summary
ALSA-2025:13604: Moderate: python-requests security update. Affects python3-requests versions < 2.32.4-1.el10_0. Fixed in 2.32.4-1.el10_0. 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
Python3-requests is a widely used HTTP library for Python, designed to simplify making HTTP requests. It provides a user-friendly interface for sending HTTP requests and handling responses, supporting various authentication methods and session management. However, a recent vulnerability has been identified that could expose sensitive .netrc credentials through malicious URLs.
Vulnerability Detail
The vulnerability, identified as CVE-2024-47081, allows for a leak of .netrc credentials when users interact with malicious URLs. This could lead to unauthorized access to sensitive information, as the .netrc file typically contains login credentials for various services. The issue arises from improper handling of URLs, which can be exploited by attackers to extract sensitive data from the user's environment.
How To Fix
Minimum fixed version
2.32.4-1.el10_0
This is the first release that contains the fix.
sudo dnf update python3-requests
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid using .netrc files or ensure that their applications do not interact with untrusted URLs. Additionally, consider using environment variables for sensitive credentials instead of relying on .netrc.
Conclusion
The python3-requests library has a critical vulnerability that can lead to the exposure of sensitive credentials. It is essential for users to update to the latest patched version to protect against potential attacks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for python3-requests →
FAQ
The impact includes potential unauthorized access to sensitive credentials stored in the .netrc file, which could lead to data breaches.
You can use Vulert, which monitors open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.
Yes, you can avoid using .netrc files or ensure that your application does not interact with untrusted URLs as a temporary measure.
Consider implementing workarounds such as using environment variables for credentials and avoiding untrusted URLs until the package can be updated.
More details can be found on the CVE page for CVE-2024-47081, which provides insights into the vulnerability's impact and mitigation strategies.
Related vulnerabilities
Recent vulnerabilities recorded for python3-requests.