Cloudanix VulnDB

CVE-2024-47081

Medium · 5.3

CVSS

5.3

EPSS

1.0%

Published

Jun 9, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A widely used Python web library could accidentally send saved login credentials to the wrong website if tricked into opening a specially crafted link.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
High
Impact
Other
Component
Library
Class
Credential Exposure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Requests versions prior to 2.32.4 contain a URL parsing flaw that can cause credentials sourced from a .netrc file to be attached to HTTP requests sent to an unintended third-party destination when an application follows or fetches a maliciously crafted URL. The issue affects confidentiality only: an attacker who can cause a vulnerable Python application to request a crafted URL may receive Basic Authentication credentials that Requests automatically loaded from .netrc. The flaw requires the vulnerable application to use Requests with environment trust enabled, to have relevant .netrc credentials available, and to process attacker-influenced URLs.

Why it matters to the business

Applications that fetch user-supplied or externally controlled URLs with vulnerable Requests versions may unintentionally disclose service credentials, API credentials, or automation account secrets to an attacker-controlled host. Exposed credentials can enable unauthorized access to internal or third-party services, data theft, supply-chain compromise, or follow-on lateral movement depending on what the leaked credentials can access. This is not currently listed in CISA KEV, is not known to be used in ransomware campaigns, and has low EPSS, but Requests is widely used in Python ecosystems, so dependency inventory and remediation should still be prioritized for internet-facing services, automation, CI/CD workers, and systems that store .netrc credentials.

How an attack unfolds

An attacker first identifies an application or workflow that accepts or processes externally influenced URLs using a vulnerable Requests release. The attacker then supplies a specially crafted URL that triggers the URL parsing confusion. When the application makes the outbound HTTP request, Requests may consult the local .netrc file and attach credentials intended for a different host or context. The request is directed to a server the attacker controls or can observe, allowing the attacker to capture the Authorization header or equivalent credential material. The attacker can then attempt to reuse the leaked credentials against the service for which they were originally valid. Successful exploitation is most likely in URL-fetching services, webhook processors, build/release automation, internal scripts, and applications that run with user or service-account .netrc files.

How to fix it

Upgrade Requests to version 2.32.4 or later wherever it is used directly or transitively. For source builds from the psf/requests Git repository, ensure the code includes fixed commit 021dc729f0b71a3030cefdbec7fb57a0e80a6cfd or a later revision. Where immediate upgrade is not possible, disable .netrc/environment credential use by creating sessions with trust_env=False, for example by setting session.trust_env = False on Requests Session objects. Remove unnecessary .netrc entries from application, service, CI/CD, and developer environments. Avoid using .netrc for privileged service credentials in automated workloads; prefer scoped secret managers and explicit authentication per destination. Add allowlists or strict validation for any externally supplied URLs and block redirects or requests to unapproved schemes, hosts, and IP ranges. Rotate any credentials that may have been available in .netrc on systems that processed untrusted URLs while running vulnerable versions.

How to confirm the fix worked

Confirm installed Requests versions with package inventory tools such as pip show requests, pip freeze, poetry show requests, pipenv graph, conda list requests, SBOM scanners, container image scanners, and dependency lockfile review. Validate that all resolved direct and transitive dependencies use Requests 2.32.4 or later, or a patched Git revision at or after 021dc729f0b71a3030cefdbec7fb57a0e80a6cfd. Search code for Requests Session usage and verify trust_env=False is set where .netrc must not be consulted. Confirm application runtimes, containers, virtual environments, CI runners, and serverless packages were rebuilt after dependency updates. Test representative URL-fetching paths with controlled .netrc credentials and confirm credentials are not sent to unexpected hosts or after crafted/ambiguous URL input. Review egress controls to ensure applications that process external URLs can only contact approved destinations.

Typical attack path

  1. Find or induce a vulnerable Python application, script, CI job, or service to fetch attacker-controlled URLs using Requests prior to 2.32.4.
  2. Confirm the application environment uses .netrc-based authentication or inherits environment configuration through Requests' default trust_env behavior.
  3. Provide a maliciously crafted URL designed to trigger the parsing issue and cause credential selection for the wrong destination.
  4. Receive the outbound request on attacker-controlled infrastructure and capture authentication material such as a Basic Authorization header.
  5. Replay or validate the exposed credential against the intended upstream service.
  6. Use any successful access for data retrieval, persistence, privilege escalation, or movement to other connected systems.

How to detect it

There is no universal exploit signature because exploitation depends on attacker-supplied URLs and environment-specific .netrc contents. Investigate systems that ran Requests versions prior to 2.32.4 and had .netrc files while processing untrusted URLs. Review outbound proxy logs, web gateway logs, DNS logs, EDR network telemetry, application HTTP client logs, CI/CD runner logs, and server access logs for unexpected external destinations contacted by Python Requests clients. Look for requests to unfamiliar domains that include Authorization headers, especially Basic authentication, from services that normally authenticate only to known internal or vendor endpoints. Compare outbound destinations around user-submitted URL, webhook, redirect, or URL-preview events. Inspect application and proxy logs for crafted or ambiguous URLs, embedded userinfo, unusual host delimiters, percent-encoding, or redirects that precede credential-bearing requests. If a possible leak is found, treat the corresponding .netrc entries as compromised, rotate them, and review downstream service logs for subsequent successful logins or API calls from unfamiliar IP addresses or user agents.

  • .netrc
  • _netrc
  • Authorization: Basic
  • python-requests/
  • requests/2.32.3
  • requests/2.32.2
  • requests/2.32.1
  • requests/2.32.0
  • trust_env = True
  • trust_env=True
  • session.trust_env
  • NETRC
  • netrc.netrc

What your security team should do

  • Inventory all Python applications, containers, CI/CD jobs, automation scripts, and serverless packages that include psf/requests prior to 2.32.4.
  • Prioritize remediation for systems that process untrusted URLs, follow redirects, act as webhook consumers, perform URL previewing/fetching, or run with .netrc files present.
  • Upgrade to Requests 2.32.4 or later and rebuild/redeploy affected artifacts rather than only updating source manifests.
  • Where upgrades are delayed, set Requests sessions to trust_env=False and remove or restrict .netrc files from service accounts and build agents.
  • Rotate credentials stored in .netrc on any host or runner that used vulnerable Requests versions to fetch untrusted or externally supplied URLs.
  • Add outbound proxy, DNS, or egress monitoring for unexpected destinations contacted by Python Requests clients, especially where Authorization headers are present.
  • Harden URL ingestion with host allowlists, scheme restrictions, redirect controls, and protections against ambiguous, encoded, or userinfo-containing URLs.
  • Document and enforce a policy discouraging .netrc-based authentication for production workloads and CI/CD systems handling untrusted input.

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
PyPI requests 0 2.32.4
AlmaLinux:10 python3-requests 0 2.32.4-1.el10_0
AlmaLinux:8 fence-agents-all 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-amt-ws 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-apc 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-apc-snmp 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-bladecenter 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-brocade 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-cisco-mds 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-cisco-ucs 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-common 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-compute 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-drac5 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-eaton-snmp 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-emerson 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-eps 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-heuristics-ping 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-hpblade 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ibm-powervs 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ibm-vpc 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ibmblade 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ifmib 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ilo-moonshot 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ilo-mp 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ilo-ssh 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ilo2 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-intelmodular 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ipdu 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-ipmilan 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-kdump 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-kubevirt 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-lpar 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-mpath 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-redfish 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-rhevm 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-rsa 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-rsb 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-sbd 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-scsi 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-virsh 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-vmware-rest 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-vmware-soap 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-wti 0 4.2.1-129.el8_10.14
AlmaLinux:8 fence-agents-zvm 0 4.2.1-129.el8_10.14
AlmaLinux:8 python3-requests 0 2.20.0-6.el8_10
AlmaLinux:8 resource-agents 0 4.9.0-54.el8_10.16
AlmaLinux:8 resource-agents-aliyun 0 4.9.0-54.el8_10.16
AlmaLinux:8 resource-agents-gcp 0 4.9.0-54.el8_10.16
AlmaLinux:8 resource-agents-paf 0 4.9.0-54.el8_10.16
AlmaLinux:9 python3-requests 0 2.25.1-10.el9_6
AlmaLinux:9 python3-requests+security 0 2.25.1-10.el9_6
AlmaLinux:9 python3-requests+socks 0 2.25.1-10.el9_6
Alpine:v3.19 py3-requests 0 2.32.4-r0
Alpine:v3.20 py3-requests 0 2.32.4-r0
Alpine:v3.21 py3-requests 0 2.32.4-r0
Alpine:v3.22 py3-requests 0 2.32.4-r0
Chainguard airflow-3 0 3.0.1-r1
Chainguard airflow-3-bitnami-compat 0 3.0.1-r1
Chainguard airflow-3-compat 0 3.0.1-r1
Chainguard airflow-3-iamguarded-compat 0 3.0.1-r1
Chainguard airflow-core-2 0 2.11.0-r2
Chainguard airflow-core-2-compat 0 2.11.0-r2
Chainguard airflow-core-2-oci-entrypoint 0 2.11.0-r2
Chainguard airflow-core-3 0 3.0.2-r0
Chainguard airflow-core-3-compat 0 3.0.2-r0
Chainguard airflow-core-3-oci-entrypoint 0 3.0.2-r0
Chainguard ansible-operator 0 1.41.0-r1
Chainguard ansible-operator-compat 0 1.41.0-r1
Chainguard apache-beam-python-3.11-sdk 0 2.65.0-r1
Chainguard awx 0 0
Chainguard az 0 2.74.0-r1
Chainguard az-iamguarded-compat 0 2.74.0-r1
Chainguard barman 0 3.14.0-r1
Chainguard barman-cloudnative-pg 0 3.14.0-r1
Chainguard confluent-docker-utils 0 0.0.162-r0
Chainguard dask-gateway 0 2025.4.0-r2
Chainguard dask-gateway-server 0 2025.4.0-r2
Chainguard dask-kubernetes 0 2025.4.3-r2
Chainguard dask-kubernetes 0 0
Chainguard datadog-agent 0 7.67.0-r1
Chainguard datadog-agent-core-integrations 0 7.67.0-r1
Chainguard datadog-agent-core-integrations-fips 0 7.66.1-r2
Chainguard datadog-agent-core-integrations-fips 0 7.67.0-r1
Chainguard datadog-agent-fakeintake 0 7.67.0-r1
Chainguard datadog-agent-fakeintake-fips 0 7.66.1-r2
Chainguard datadog-agent-fakeintake-fips 0 7.67.0-r1
Chainguard datadog-agent-fips 0 7.66.1-r2
Chainguard datadog-agent-fips 0 7.67.0-r1
Chainguard datadog-agent-jmx 0 7.67.0-r1
Chainguard datadog-agent-jmx-fips 0 7.66.1-r2
Chainguard datadog-agent-jmx-fips 0 7.67.0-r1
Chainguard datadog-agent-oci-compat 0 7.67.0-r1
Chainguard datadog-agent-oci-compat-fips 0 7.66.1-r2
Chainguard datadog-agent-oci-compat-fips 0 7.67.0-r1
Chainguard datadog-agent-s6-overlay 0 7.67.0-r1
Chainguard datadog-agent-s6-overlay-fips 0 7.66.1-r2
Chainguard datadog-agent-s6-overlay-fips 0 7.67.0-r1
Chainguard datadog-cluster-agent 0 7.67.0-r1
Chainguard datadog-cluster-agent 0 7.71.2-r3
Chainguard datadog-cluster-agent-fips 0 7.66.1-r2
Chainguard datadog-cluster-agent-fips 0 7.67.0-r1
Chainguard datadog-cluster-agent-oci-compat 0 7.67.0-r1
Chainguard datadog-cluster-agent-oci-compat 0 7.71.2-r3
Chainguard datadog-cluster-agent-oci-compat-fips 0 7.66.1-r2
Chainguard datadog-cluster-agent-oci-compat-fips 0 7.67.0-r1
Chainguard dogstatsd 0 7.67.0-r1
Chainguard emissary 0 3.10.0-r5
Chainguard emissary-apiext 0 3.10.0-r5
Chainguard emissary-oci-entrypoint 0 3.10.0-r5
Chainguard ggshield 0 1.40.0-r1
Chainguard graalvm-23 0 23.0.2-r7
Chainguard graalvm-23-ce 0 23.0.2-r7
Chainguard graalvm-23-ce-dbg 0 23.0.2-r7
Chainguard graalvm-23-ce-default-jdk 0 23.0.2-r7
Chainguard graalvm-23-ce-jmods 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs-dbg 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs-default-jdk 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs-jmods 0 23.0.2-r7
Chainguard graalvm-23-graalpy 0 23.0.2-r7
Chainguard graalvm-23-truffleruby 0 23.0.2-r7
Chainguard graalvm-24 0 24.0.2-r6
Chainguard graalvm-24-ce 0 24.0.2-r6
Chainguard graalvm-24-ce-dbg 0 24.0.2-r6
Chainguard graalvm-24-ce-default-jdk 0 24.0.2-r6
Chainguard graalvm-24-ce-jmods 0 24.0.2-r6
Chainguard graalvm-24-ce-nodejs 0 24.0.2-r6
Chainguard graalvm-24-ce-nodejs-dbg 0 24.0.2-r6
Chainguard graalvm-24-ce-nodejs-default-jdk 0 24.0.2-r6
Chainguard graalvm-24-ce-nodejs-jmods 0 24.0.2-r6
Chainguard graalvm-24-graalpy 0 24.0.2-r6
Chainguard graalvm-24-truffleruby 0 24.0.2-r6
Chainguard graalvm-25 0 25.0.1-r0
Chainguard graalvm-25-ce 0 25.0.1-r0
Chainguard graalvm-25-ce-dbg 0 25.0.1-r0
Chainguard graalvm-25-ce-default-jdk 0 25.0.1-r0
Chainguard graalvm-25-ce-jmods 0 25.0.1-r0
Chainguard graalvm-25-ce-nodejs 0 25.0.1-r0
Chainguard graalvm-25-ce-nodejs-dbg 0 25.0.1-r0
Chainguard graalvm-25-ce-nodejs-default-jdk 0 25.0.1-r0
Chainguard graalvm-25-ce-nodejs-jmods 0 25.0.1-r0
Chainguard graalvm-25-graalpy 0 25.0.1-r0
Chainguard graalvm-25-truffleruby 0 25.0.1-r0
Chainguard grafana-oncall 0 1.16.4-r2
Chainguard grafana-oncall-compat 0 1.16.4-r2
Chainguard jupyter-base-notebook 0 7.4.3-r1
Chainguard jupyter-base-notebook-oci-entrypoint 0 0.0.0_git20251013-r0
Chainguard jwt-tool 0 2.3.0-r1
Chainguard k8s-sidecar 0 1.30.3-r1
Chainguard katib-cert-generator 0 0.18.0-r6
Chainguard katib-cert-generator-compat 0 0.18.0-r6
Chainguard katib-controller 0 0.18.0-r6
Chainguard katib-controller-compat 0 0.18.0-r6
Chainguard katib-db-manager 0 0.18.0-r6
Chainguard katib-db-manager-compat 0 0.18.0-r6
Chainguard katib-earlystopping 0 0.18.0-r6
Chainguard katib-file-metricscollector 0 0.18.0-r6
Chainguard katib-file-metricscollector-compat 0 0.18.0-r6
Chainguard katib-suggestion-goptuna 0 0.18.0-r6
Chainguard katib-suggestion-goptuna-compat 0 0.18.0-r6
Chainguard katib-suggestion-hyperband 0 0.18.0-r6
Chainguard katib-suggestion-hyperopt 0 0.18.0-r6
Chainguard katib-suggestion-nas-darts 0 0.18.0-r6
Chainguard katib-suggestion-nas-enas 0 0.18.0-r6
Chainguard katib-suggestion-optuna-enas 0 0.18.0-r6
Chainguard katib-suggestion-pbt-enas 0 0.18.0-r6
Chainguard katib-suggestion-skopt-enas 0 0.18.0-r6
Chainguard katib-tfevent-metricscollector 0 0.18.0-r6
Chainguard kserve 0 0
Chainguard kserve-agent 0 0
Chainguard kserve-agent-compat 0 0
Chainguard kserve-manager 0 0
Chainguard kserve-manager-compat 0 0
Chainguard kserve-qpext 0 0
Chainguard kserve-qpext-compat 0 0
Chainguard kserve-router 0 0
Chainguard kserve-router-compat 0 0
Chainguard kserve-storage-controller 0 0
Chainguard kubeflow-jupyter-web-app 0 1.10.0-r4
Chainguard kubeflow-katib 0 0.18.0-r6
Chainguard kubeflow-pipelines 0 0
Chainguard kubeflow-pipelines-apiserver 0 0
Chainguard kubeflow-pipelines-cache-deployer 0 0
Chainguard kubeflow-pipelines-cache-deployer-compat 0 0
Chainguard kubeflow-pipelines-cache_server 0 0
Chainguard kubeflow-pipelines-frontend 0 0
Chainguard kubeflow-pipelines-metadata-envoy-config 0 0
Chainguard kubeflow-pipelines-metadata-writer 0 0
Chainguard kubeflow-pipelines-metadata-writer-compat 0 0
Chainguard kubeflow-pipelines-persistence_agent 0 0
Chainguard kubeflow-pipelines-scheduledworkflow 0 0
Chainguard kubeflow-pipelines-viewer-crd-controller 0 0
Chainguard kubeflow-pipelines-visualization-server 0 2.5.0-r3
Chainguard kubeflow-volumes-web-app 0 0
Chainguard localstack 0 4.10.0-r0
Chainguard localstack-compat 0 4.10.0-r0
Chainguard mlflow 0 3.1.0-r0
Chainguard mlflow-bitnami 0 3.1.0-r0
Chainguard mlflow-iamguarded-compat 0 3.1.0-r0
Chainguard nemo 0 2.3.1-r5

Related vulnerabilities