psf/requests · Security

Requests vulnerable to .netrc credentials leak via malicious URLs

GHSA ID
GHSA-9hjg-9r4m-mvj7
CVE ID
CVE-2024-47081
Severity
medium
Published
Updated
CVSS
5.3 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
CVSS v3
5.3 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

Description

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

References

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

CWEs

References