{"id":"CVE-2021-41945","aliases":["CVE-2021-41945","GHSA-h8pj-cxx2-jfg2","PYSEC-2022-183"],"related":[],"kind":"vulnerability","state":"published","title":"Improper Input Validation in httpx","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`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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`.","source":"cvelist"},{"lang":"en","text":"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`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Encode OSS httpx anterior a la versión 0.23.0 se ve afectado por una validación de entrada inadecuada en `httpx.URL`, `httpx.Client` y algunas funciones que utilizan `httpx.URL.copy_with`.","source":"nvd"}],"published":"2022-04-28T13:22:10.000Z","modified":"2026-07-09T01:17:04.390Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.23.0"}],"ecosystem":"PyPI","package":"httpx","purl":"pkg:pypi/httpx","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.23.0"}],"vendor":"encode","product":"httpx","cpe":"cpe:2.3:a:encode:httpx:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.20.0"}],"ecosystem":"PyPI","package":"httpx","purl":"pkg:pypi/httpx","source":"pysec"}],"references":[{"url":"https://gist.github.com/lebr0nli/4edb76bbd3b5ff993cf44f2fbce5e571","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/encode/httpx","tags":["package","product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/encode/httpx/discussions/1831","tags":["exploit","issue-tracking","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/encode/httpx/issues/2184","tags":["exploit","issue-tracking","report","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/encode/httpx/releases/tag/0.23.0","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41945","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/encode/httpx/pull/2185","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/encode/httpx/pull/2185/commits/e3c495a32c63d8aa7f1bcf3b7b27ee1a0ff428e1","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/encode/httpx/commit/e9b0c85dd4f4e4469c57c4b38e5101fd12081b5c","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-h8pj-cxx2-jfg2","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/httpx/PYSEC-2022-183.yaml","tags":["web"],"sources":["ghsa"]},{"url":"http://encode.com","tags":["web"],"sources":["ghsa","pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-41945","url":"https://www.cve.org/CVERecord?id=CVE-2021-41945","licence":"CVE Terms of Use","modified":"2026-07-09T00:15:07.517Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h8pj-cxx2-jfg2","url":"https://github.com/advisories/GHSA-h8pj-cxx2-jfg2","licence":"CC-BY-4.0","modified":"2025-02-13T05:30:38.616Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-41945","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41945","licence":"Public domain","modified":"2026-07-09T01:17:04.390Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-183","url":"https://osv.dev/vulnerability/PYSEC-2022-183","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:03.301Z"}],"updatedAt":"2026-11-25T22:58:07.427Z","epss":{"score":0.02118,"percentile":0.82384,"date":"2026-12-01T12:00:22.000Z"}}