# CVE-2022-0391: Other in python

> Attackers can inject CRLF characters into URLs via the urllib.parse module, potentially leading to injection attacks in applications using this library.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Feb 2022
- **Updated:** 14 Oct 2026
- **Also known as:** AZL-109641, BIT-libpython-2022-0391, BIT-python-2022-0391, BIT-python-min-2022-0391, CLSA-2022-1646665957, CLSA-2022-1646666442, CLSA-2022-1647254655, CLSA-2022-1654106859, DEBIAN-CVE-2022-0391, GHSA-75jm-2xrg-5wpf, PSF-2022-8, UBUNTU-CVE-2022-0391, openSUSE-SU-2024:11839-1

## What is CVE-2022-0391?

CVE-2022-0391 is a high-severity vulnerability in Fedoraproject Fedora, published on 9 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2022-0391?

3 open source packages ship an affected version, including libpython, python and python-min. It affects 10 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.6.14, 3.7.11, 3.8.11, 3.9.5 |
| `python` | Bitnami | All versions | 3.6.14, 3.7.11, 3.8.11, 3.9.5 |
| `python-min` | Bitnami | All versions | 3.6.14, 3.7.11, 3.8.11, 3.9.5 |
| `python` | openSUSE:Tumbleweed | All versions | 2.7.18-16.1 |

Products: Fedoraproject Fedora, Netapp Active Iq Unified Manager, Netapp Hci, Netapp Hci Compute Node, Netapp Management Services for Element Software, Netapp Ontap Select Deploy Administration Utility, Netapp Solidfire\, Enterprise Sds \& Hci Storage Node, Oracle Http Server, Oracle Zfs Storage Appliance Kit, Python Python.

## How do I fix CVE-2022-0391?

Upgrade libpython to a fixed version for your release line: 3.6.14, 3.7.11, 3.8.11 or 3.9.5.

## Is CVE-2022-0391 being exploited?

There is no known exploitation of CVE-2022-0391 in the wild and no public exploit code.

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-0391 and fix it if it is affected.

What it is: CVE-2022-0391 is a high-severity vulnerability in Fedoraproject Fedora, published on 9 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-0391 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.6.14, 3.7.11, 3.8.11, 3.9.5
- python (Bitnami): affected all versions; fixed in 3.6.14, 3.7.11, 3.8.11, 3.9.5
- python-min (Bitnami): affected all versions; fixed in 3.6.14, 3.7.11, 3.8.11, 3.9.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-0391/ (Markdown: https://insights.sbomify.com/CVE-2022-0391/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-0391
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-0391
- OSV: https://osv.dev/vulnerability/CVE-2022-0391

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-0391/
Summaries are generated and may contain mistakes; the official description above is the record.
