# CVE-2024-47081: Requests vulnerable to .netrc credentials leak via malicious URLs

Source: https://junglewise.ai/threats/cve-2024-47081-requests-vulnerable-to-netrc-credentials-leak-via-malicious-urls  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-06-09  
License: CC BY 4.0 with a link back

CVE-2024-47081 · Severity: medium · CVSS 5.3 · Published 2025-06-09

### Impact

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.

### Workarounds
For older versions of Requests, use of the .netrc file can be disabled with `trust_env=False` on your Requests Session ([docs](https://requests.readthedocs.io/en/latest/api/#requests.Session.trust_env)).

### References
https://github.com/psf/requests/pull/6965
https://seclists.org/fulldisclosure/2025/Jun/2

Technologies: [requests (PyPI)](https://junglewise.ai/threats/technologies/requests). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-47081 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-47081 being exploited in the wild.

**How severe is CVE-2024-47081?** Medium severity, with a CVSS score of 5.3, published 9 June 2025.

**Which products and versions are affected?** requests (PyPI) < 2.32.4, ECOSYSTEM:introduced=0,fixed=2.32.4.

**Is there a fix for CVE-2024-47081?** Yes. requests (PyPI): upgrade to 2.32.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-47081?** Check whether you run requests (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- requests (PyPI): upgrade to 2.32.4 or later

  ```sh
  pip install "requests>=2.32.4"
  ```


## Affected products

- requests (PyPI) < 2.32.4, ECOSYSTEM:introduced=0,fixed=2.32.4

## Identifiers

- CVE-2024-47081
- GHSA-9hjg-9r4m-mvj7
- PYSEC-2026-1872

## Related threats

- [PYSEC-2026-1873 - Requests `Session` object does not verify requests after making first request with verify=False](https://junglewise.ai/threats/cve-2024-35195-requests-session-object-does-not-verify-requests-after-making)
- [Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function](https://junglewise.ai/threats/cve-2026-25645-requests-has-insecure-temp-file-reuse-in-its-extract-zipped-paths)
- [Unintended leak of Proxy-Authorization header in requests](https://junglewise.ai/threats/cve-2023-32681-unintended-leak-of-proxy-authorization-header-in-requests)
- [Insufficiently Protected Credentials in Requests](https://junglewise.ai/threats/cve-2018-18074-insufficiently-protected-credentials-in-requests)
- [Python Requests Session Fixation](https://junglewise.ai/threats/cve-2015-2296-python-requests-session-fixation)
