CVE-2021-41945 json
Improper Input Validation in httpx
published 2022-04-28 4 y ago modified 2026-07-09 4 mo ago also GHSA-h8pj-cxx2-jfg2 , PYSEC-2022-183 , EUVD-2022-0122
- cvss
- 9.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.1%
- EPSS 2.1% chance of exploitation in 30 days, percentile 81%
- public exploits
- 0
- none known
Summary
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`.
Patch / fix
- pypi httpx 0.20.0, 0.23.0
- encode httpx 0.23.0
- httpx Debian 14, Debian 13, Debian 12 0.23.0-1
debian advisories DEBIAN-CVE-2021-41945
- python-httpx openSUSE Tumbleweed 0.28.1-2.1
opensuse advisories openSUSE-SU-2025:14664-1
- python-httpx Arch Linux 0.22.0-2
arch linux advisories AVG-2718
- github.com/encode/httpx#2185 commit
- github.com/encode/httpx@e9b0c85 commit
- github.com/encode/httpx#2185 pull request
- github.com/encode/httpx/releases/tag/0.23.0 release
Exploit prediction
2.12% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- gist.github.com https://gist.github.com/lebr0nli/4edb76bbd3b5ff993cf44f2fbce5e571 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/encode/httpx/discussions/1831 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/encode/httpx/issues/2184 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 2.0 | 6.4 | AV:N/AC:L/Au:N/C:P/I:P/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | httpx | <0.23.0 <0.20.0 |
0.23.0 0.20.0 |
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
github.com
/encode/httpx/pull/2185
web
-
github.com
/encode/httpx/pull/2185/commits/e3c495a32c63d8aa7f1bcf3b7b27ee1a0ff428e1
web
-
github.com
/encode/httpx/commit/e9b0c85dd4f4e4469c57c4b38e5101fd12081b5c
web
-
gist.github.com
/lebr0nli/4edb76bbd3b5ff993cf44f2fbce5e571
web, exploit, third-party-advisory
-
github.com
/encode/httpx/discussions/1831
web, exploit, issue-tracking, third-party-advisory
-
github.com
/encode/httpx/issues/2184
web, exploit, issue-tracking, third-party-advisory, report
-
github.com
/encode/httpx
package, product, third-party-advisory, web
-
github.com
/encode/httpx/releases/tag/0.23.0
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-41945
advisory
-
github.com
/advisories/GHSA-h8pj-cxx2-jfg2
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/httpx/PYSEC-2022-183.yaml
web
-
encode.com
web
Sources
- CVE List CVE-2021-41945
- GitHub Advisory GHSA-h8pj-cxx2-jfg2
- NVD CVE-2021-41945
- OSV PYSEC-2022-183
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.