Medium severity5.3NVD Advisory· Published Jun 9, 2025· Updated Apr 15, 2026
CVE-2024-47081
CVE-2024-47081
Description
Requests is a HTTP library. Due to a URL parsing issue, Requests releases prior to 2.32.4 may leak .netrc credentials to third parties for specific maliciously-crafted URLs. Users should upgrade to version 2.32.4 to receive a fix. For older versions of Requests, use of the .netrc file can be disabled with trust_env=False on one's Requests Session.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
requestsPyPI | < 2.32.4 | 2.32.4 |
Patches
2021dc729f0b796ba401c1296Only use hostname to do netrc lookup instead of netloc
1 file changed · +1 −7
src/requests/utils.py+1 −7 modified@@ -236,13 +236,7 @@ def get_netrc_auth(url, raise_errors=False): return ri = urlparse(url) - - # Strip port numbers from netloc. This weird `if...encode`` dance is - # used for Python 3.2, which doesn't support unicode literals. - splitstr = b":" - if isinstance(url, str): - splitstr = splitstr.decode("ascii") - host = ri.netloc.split(splitstr)[0] + host = ri.hostname try: _netrc = netrc(netrc_path).authenticators(host)
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
12- github.com/advisories/GHSA-9hjg-9r4m-mvj7ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-47081ghsaADVISORY
- seclists.org/fulldisclosure/2025/Jun/2nvdWEB
- www.openwall.com/lists/oss-security/2025/06/03/11nvdWEB
- www.openwall.com/lists/oss-security/2025/06/03/9nvdWEB
- www.openwall.com/lists/oss-security/2025/06/04/1nvdWEB
- www.openwall.com/lists/oss-security/2025/06/04/6nvdWEB
- github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144efnvdWEB
- github.com/psf/requests/pull/6965nvdWEB
- github.com/psf/requests/security/advisories/GHSA-9hjg-9r4m-mvj7nvdWEB
- requests.readthedocs.io/en/latest/api/nvdWEB
- seclists.org/fulldisclosure/2025/Jun/2nvdWEB
News mentions
0No linked articles in our index yet.