Vulnerabilities in pkg:pypi/requests

PACKAGE
Advisory Identifier: GHSA-9hjg-9r4m-mvj7
Advisory Summary

CVE-2024-47081 is a MODERATE (CVSS 5.3) requests vulnerable to .netrc credentials vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Requests libraries in the PyPI ecosystem. The issue involves requests vulnerable to .netrc credentials leak via malicious urls. Remediation is available by upgrading affected packages to version 2.32.4.

8 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/requests

8 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/requests. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9hjg-9r4m-mvj7 CVE-2024-47081 MODERATE Requests vulnerable to .netrc credentials leak via malicious URLs
GHSA-gc5v-m9x4-r6x2 CVE-2026-25645 MODERATE Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility function
GHSA-9wx4-h78v-vm56 CVE-2024-35195 MODERATE Requests `Session` object does not verify requests after making first request with verify=False
GHSA-j8r2-6x86-q33q CVE-2023-32681 MODERATE Unintended leak of Proxy-Authorization header in requests
GHSA-cfj3-7x9c-4p3h CVE-2014-1829 MODERATE Exposure of Sensitive Information to an Unauthorized Actor in Requests
GHSA-652x-xj99-gmcc CVE-2014-1830 MODERATE Exposure of Sensitive Information to an Unauthorized Actor in Requests
GHSA-x84v-xcm2-53pg CVE-2018-18074 HIGH Insufficiently Protected Credentials in Requests
GHSA-pg2w-x9wp-vw92 CVE-2015-2296 MODERATE Python Requests Session Fixation

CVE-2024-47081 at a Glance

CVE Identifier CVE-2024-47081
GHSA Identifier GHSA-9hjg-9r4m-mvj7
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Requests
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-47081

To remediate this vulnerability, upgrade all affected Requests dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

requests fixed: 2.32.4
pip install requests>=2.32.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show requests

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-47081, inspect your installed packages using pip:

pip show requests

Analyze the terminal output to locate any version of Requests in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.32.4), your application is affected.

Note: The pip show requests command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Requests, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2024-47081 Affected Requests Versions

1 component(s)
Fixed Versions:
2.32.4
Product / Package Ecosystem Affected Versions Fixed Version
requests
PyPI
< 2.32.4
2.32.4

References

Frequently Asked Questions

What is CVE-2024-47081?
CVE-2024-47081 is a security vulnerability in Requests involving Requests vulnerable to .netrc credentials leak via malicious URLs under CWE-522: Insufficiently Protected Credentials.
Which Requests versions are affected?
Affected versions include releases prior to 2.32.4 across affected packages: requests.
What version fixes CVE-2024-47081?
Upgrading to 2.32.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is requests affected?
Yes, requests is affected in releases prior to 2.32.4. Upgrade your dependency to 2.32.4 or later.
What is the CVSS score of CVE-2024-47081?
CVE-2024-47081 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-47081?
CVE-2024-47081 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check PyPI dependencies for CVE-2024-47081?
Run the dependency tree command: 'pip show requests'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9hjg-9r4m-mvj7",
  "modified" : "2026-10-19T19:50:58Z",
  "published" : "2025-06-09T19:06:08Z",
  "aliases" : [ "CVE-2024-47081" ],
  "summary" : "Requests vulnerable to .netrc credentials leak via malicious URLs",
  "details" : "### Impact\n\nDue to a URL parsing issue, Requests releases prior to 2.32.4 may leak .netrc credentials to third parties for specific maliciously-crafted URLs.\n\n### Workarounds\nFor 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)).\n\n### References\nhttps://github.com/psf/requests/pull/6965\nhttps://seclists.org/fulldisclosure/2025/Jun/2",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "requests"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.32.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/psf/requests/security/advisories/GHSA-9hjg-9r4m-mvj7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47081"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/psf/requests/pull/6965"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-9hjg-9r4m-mvj7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/psf/requests"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/psf/requests/releases/tag/v2.32.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/requests/PYSEC-2026-1872.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/requests"
  }, {
    "type" : "WEB",
    "url" : "https://requests.readthedocs.io/en/latest/api/#requests.Session.trust_env"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/fulldisclosure/2025/Jun/2"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/06/03/11"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/06/03/9"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/06/04/1"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/06/04/6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-09T19:06:08Z",
    "nvd_published_at" : "2025-06-09T18:15:24Z"
  }
}