Advisory

GHSA-9hjg-9r4m-mvj7

Also known as: CVE-2024-47081, PYSEC-2026-1872

Summary

Requests vulnerable to .netrc credentials leak via malicious URLs

Details

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-06-09 19:06 UTC
Modified
2026-10-19 20:00 UTC

Affected packages and fixes

requests

PyPI · All systems

Affected

  • introduced 0, fixed 2.32.4 (ecosystem)

Fixed versions

2.32.4

Fix

  • Fixed version 2.32.4
    pip install --upgrade requests==2.32.4

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences