Bug 2372479

Summary: CVE-2024-47081 python3.6: Requests vulnerable to .netrc credentials leak via malicious URLs [fedora-42]
Product: [Fedora] Fedora Reporter: Michal Findra <mfindra>
Component: python3.6Assignee: Lumír Balhar <lbalhar>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 42CC: cstratak, lbalhar, mhroncok, python-maint, python-packagers-sig, torsava, vstinner
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["8650814a-ebe1-4a16-bf17-ff3f80bab2f3"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-07-25 10:06:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2371272    

Description Michal Findra 2025-06-12 14:20:31 UTC
More information about this security flaw is available in the following bug:

https://bugzilla.redhat.com/show_bug.cgi?id=2371272

Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

Comment 1 Lumír Balhar 2025-07-25 10:06:45 UTC
Requests is bundled in pip, and that is part of the ensurepip package in the Python standard library.

I've verified that there is no way to exploit the vulnerability in the bundled requests library via any calls to pip. The vulnerable function (fixed in https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef) is there, but it is never used because pip has the logic for loading usernames and passwords from netrc files implemented in MultiDomainBasicAuth class (in _internal/network/auth.py or download.py in older releases of pip).