CVE-2021-41945
Python vulnerability analysis and mitigation

Overview

Encode OSS httpx < 0.23.0 is affected by improper input validation in httpx.URL, httpx.Client and some functions using httpx.URL.copy_with. The vulnerability was discovered in 2021 and publicly disclosed on April 28, 2022 (NVD, MITRE).

Technical details

The vulnerability stems from improper implementation of httpx.URL().copywith method, which can lead to incorrect URL parsing. When copywith parses self.urireference.copy_with(**kwargs).unsplit() before returning the new URL, the new URL string returned by unsplit may make unintended changes to the URL. This vulnerability is categorized as CWE-20 (Improper Input Validation) with a CVSS v3.1 Base Score of 9.1 CRITICAL (Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) (NVD).

Impact

The vulnerability could allow attackers to bypass URL blacklists and potentially perform Server-Side Request Forgery (SSRF) attacks. For example, maliciously crafted URLs could make httpx.Client and httpx.Proxy implicitly parse wrong URLs, leading to unauthorized access to internal resources or sensitive data leakage (GitHub POC).

Mitigation and workarounds

The vulnerability was fixed in httpx version 0.23.0. The fix involves modifying the URL.copy_with implementation to properly handle URL parsing. Users are strongly recommended to upgrade to version 0.23.0 or later to address this security issue (Release Notes).

Community reactions

The vulnerability was initially reported privately through GitHub Discussions and later tracked publicly. The maintainers acknowledged the issue and worked with the reporter to develop and implement a fix. The security community recognized this as a significant security issue, leading to its inclusion in GitHub's advisory database and Dependabot dependency scanning (GitHub Discussion).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 09, 2025
CVE-2025-66645HIGH7.5
  • PythonPython
  • nicegui
NoYesDec 09, 2025
GHSA-9rwj-6rc7-p77cHIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 10, 2025
CVE-2025-67502MEDIUM5.4
  • PythonPython
  • taguette
NoYesDec 10, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management