CVE-2021-41945
Improper Input Validation in httpx
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
9.1
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.
- Record
CVE-2021-41945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - CVSS 2.0
- 6.4 Medium
AV:N/AC:L/Au:N/C:P/I:P/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-41945- Updated
- 2026-11-02
EUVDEUVD-2022-0122 No score
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.
- Record
EUVD-2022-0122- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-h8pj-cxx2-jfg2
9.3
Improper Input Validation in httpx
Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in httpx.URL, httpx.Client and some functions using httpx.URL.copy_with.
- Record
GHSA-h8pj-cxx2-jfg2- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
9.1
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.
- Record
CVE-2021-41945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-41945
9.1
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.
- Record
DEBIAN-CVE-2021-41945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
Show 6 moreShow less
OSVGHSA-h8pj-cxx2-jfg2
9.3
Improper Input Validation in httpx
Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in httpx.URL, httpx.Client and some functions using httpx.URL.copy_with.
- Record
GHSA-h8pj-cxx2-jfg2- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-41945
9.1
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.
- Record
UBUNTU-CVE-2021-41945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVCLSA-2025-1752797525 No score
TuxCare security update for httpx (1 CVE)
TuxCare rebuilt httpx to address 1 CVE. Fixed in 0.22.0.post1+tuxcare.
- Record
CLSA-2025-1752797525- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:12041-1 No score
python310-httpx-0.22.0-3.1 on GA media
These are all security issues fixed in the python310-httpx-0.22.0-3.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12041-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:14664-1 No score
python311-httpx-0.28.1-2.1 on GA media
These are all security issues fixed in the python311-httpx-0.28.1-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:14664-1- Updated
- 2026-11-02
OSVPYSEC-2022-183 No score
Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in httpx.URL, httpx.Client and some functions using httpx.URL.copy_with.
- Record
PYSEC-2022-183- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
httpxPyPI |
before 0.23.0 | 0.23.0 |
httpxTuxCare:PyPI |
0.22.0 up to 0.22.0.post1+tuxcare | 0.22.0.post1+tuxcare |
httpxDebian:12 |
before 0.23.0-1 | 0.23.0-1 |
httpxDebian:13 |
before 0.23.0-1 | 0.23.0-1 |
httpxDebian:14 |
before 0.23.0-1 | 0.23.0-1 |
httpxPyPI |
before 0.23.0, plus listed versions 0.0.10.10.00.10.10.11.00.11.1 Show 45 moreShow less0.12.00.12.10.13.00.13.0.dev10.13.0.dev20.13.10.13.20.13.30.13.dev00.14.00.14.10.14.20.14.30.15.00.15.10.15.20.15.30.15.40.15.50.16.00.16.10.17.00.17.10.18.00.18.10.18.20.19.00.20.00.21.00.21.10.21.20.21.30.22.00.6.70.6.80.7.00.7.10.7.20.7.30.7.40.7.50.7.60.7.70.7.80.8.0 |
0.23.0 |
httpxPyPI |
before 0.20.0, plus listed versions 0.0.10.10.00.10.10.11.00.11.1 Show 45 moreShow less0.12.00.12.10.13.00.13.0.dev10.13.0.dev20.13.10.13.20.13.30.13.dev00.14.00.14.10.14.20.14.30.15.00.15.10.15.20.15.30.15.40.15.50.16.00.16.10.17.00.17.10.18.00.18.10.18.20.19.00.6.70.6.80.7.00.7.10.7.20.7.30.7.40.7.50.7.60.7.70.7.80.8.00.9.00.9.10.9.20.9.30.9.40.9.5 |
0.20.0 |
httpxUbuntu:24.04:LTS |
All versions, plus listed versions 0.23.3-10.26.0-10.26.0-2 |
None known |
httpxUbuntu:25.10 |
All versions, plus listed versions 0.28.1-1 |
None known |
httpxUbuntu:26.10 |
All versions, plus listed versions 0.28.1-1build10.28.1-1.10.28.1-2 |
None known |
httpxUbuntu:26.04:LTS |
All versions, plus listed versions 0.28.1-10.28.1-1build1 |
None known |
python-httpxopenSUSE:Tumbleweed |
before 0.28.1-2.1 | 0.28.1-2.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-41945 is a critical vulnerability (CVSS 9.1) in Encode Httpx, published April 28, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.12%, the 81st percentile. Fixed in httpx 0.23.0.
References
gist.github.com/lebr0nli/4edb76bbd3b5ff993cf44f2fbce5e571
github.com/encode/httpx
github.com/encode/httpx/discussions/1831
github.com/encode/httpx/issues/2184
github.com/encode/httpx/releases/tag/0.23.0
nvd.nist.gov/vuln/detail/CVE-2021-41945
Show 11 moreShow less
github.com/encode/httpx/pull/2185
github.com/advisories/GHSA-h8pj-cxx2-jfg2
github.com/pypa/advisory-database/tree/main/vulns/httpx/PYSEC-2022-183.yaml
github.com/encode/httpx/pull/2185/commits/e3c495a32c63d8aa7f1bcf3b7b27ee1a0ff428e1
github.com/encode/httpx/commit/e9b0c85dd4f4e4469c57c4b38e5101fd12081b5c
encode.com
security-tracker.debian.org/tracker/CVE-2021-41945
ubuntu.com/security/CVE-2021-41945
sources.debian.org/src/httpx/0.22.0-2/httpx/_models.py?hl=537
cve.org/CVERecord?id=CVE-2021-41945
suse.com/security/cve/CVE-2021-41945
Left out here: 6 versions. The JSON record has them.