CVE-2021-41945Encode Httpx
Critical 9.1 No auth needed
Follow: this CVE · Encode · Encode Httpx We alert you by email or Slack (account required).
- Priority
- 70
- CVSS 3.1
- 9.1
- EPSS
- 2.1% probability of exploitation in 30 days · percentile 83
- Auth required
- No
- Published
- Apr 28, 2022
- Updated
- Jul 9, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
What happens
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`.
What to do
- Apply the vendor's security update for Httpx.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | httpx |
< 0.23.0 |
0.23.0 |
pip install "httpx>=0.23.0" |
| PyPI | httpx |
< 0.20.0 |
0.20.0 |
pip install "httpx>=0.20.0" |
Per OSV / GitHub Advisories (GHSA-h8pj-cxx2-jfg2, PYSEC-2022-183). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| encode | httpx | < 0.23.0 |
Official sources
References
Links published by the sources. Open them with care.
- gist.github.com Exploit Third Party Advisory
- github.com Product Third Party Advisory
- github.com Exploit Issue Tracking Third Party Advisory
- github.com Exploit Issue Tracking Third Party Advisory
- github.com Release Notes Third Party Advisory