cve.bz

CVE-2022-0391 Injection

7.5 highExploit referenceEPSS 8.5%Fix available

High (7.5). EPSS 8.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
8.5% (unchanged from 8.5% a week ago; 8.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 95th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2025-12-17. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-0391 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-0391?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-0391?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-0391 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2022-0391

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2022-0391](https://cve.bz/cve/badge/CVE-2022-0391.svg)](https://cve.bz/cve/CVE-2022-0391)

HTML:

<a href="https://cve.bz/cve/CVE-2022-0391"><img src="https://cve.bz/cve/badge/CVE-2022-0391.svg" alt="CVE-2022-0391"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pythonbefore 3.6.14
python:pythonfrom 3.7.0 before 3.7.11
python:pythonfrom 3.8.0 before 3.8.11
python:pythonfrom 3.9.0 before 3.9.5
python:python3.10.0:alpha1
python:python3.10.0:alpha2
python:python3.10.0:alpha3
python:python3.10.0:alpha4
python:python3.10.0:alpha5
python:python3.10.0:alpha6
fedoraproject:fedora34
fedoraproject:fedora35
oracle:http_server12.2.1.3.0
oracle:http_server12.2.1.4.0
oracle:zfs_storage_appliance_kit8.8

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10python2.72.7.16-2+deb10u3DLA-3575-1
Debian11pypy37.3.5+dfsg-2+deb11u4DLA-3966-1
Debian11python3.93.9.2-1+deb11u3DLA-4087-1
Debian12, 13, 14pypy37.3.6+dfsg-1DEBIAN-CVE-2022-0391
Ubuntu18.04:LTSpython2.72.7.17-1~18.04ubuntu1.7UBUNTU-CVE-2022-0391 USN-5342-1
Ubuntu18.04:LTSpython3.63.6.9-1~18.04ubuntu1.7UBUNTU-CVE-2022-0391 USN-5342-1
Ubuntu20.04:LTSpython3.83.8.10-0ubuntu1~20.04.4UBUNTU-CVE-2022-0391 USN-5342-1 USN-6891-1
Ubuntu22.04:LTSpython3.103.10.12-1~22.04.4USN-6891-1
UbuntuPro:14.04:LTSpython2.72.7.6-8ubuntu0.6+esm12UBUNTU-CVE-2022-0391 USN-5342-2
UbuntuPro:14.04:LTSpython3.43.4.3-1ubuntu1~14.04.7+esm12UBUNTU-CVE-2022-0391 USN-5342-1
UbuntuPro:14.04:LTSpython3.53.5.2-2ubuntu0~16.04.4~14.04.1+esm1UBUNTU-CVE-2022-0391 USN-6891-1
UbuntuPro:16.04:LTSpython2.72.7.12-1ubuntu0~16.04.18+esm1UBUNTU-CVE-2022-0391 USN-5342-1
UbuntuPro:16.04:LTSpython3.53.5.2-2ubuntu0~16.04.13+esm2UBUNTU-CVE-2022-0391 USN-5342-1 USN-6891-1
UbuntuPro:18.04:LTSpython3.63.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
UbuntuPro:18.04:LTSpython3.73.7.5-2ubuntu1~18.04.2+esm3UBUNTU-CVE-2022-0391 USN-6891-1
UbuntuPro:18.04:LTSpython3.83.8.0-3ubuntu1~18.04.2+esm2UBUNTU-CVE-2022-0391 USN-6891-1
4 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::appstreamCython, python2-Cython, Cython-debugsource and 1 more0:0.28.1-7.module+el8.1.0+3111+de3f2d8eRHSA-2022:1821
Red Hatenterprise_linux:8::appstreamCython, python38-Cython, Cython-debugsource and 1 more0:0.29.14-4.module+el8.4.0+8888+89bc7e79RHSA-2022:1764
Red Hatenterprise_linux:8::appstreamPyYAML, python2-pyyaml, PyYAML-debugsource and 1 more0:3.12-16.module+el8.1.0+3111+de3f2d8eRHSA-2022:1821
Red Hatenterprise_linux:8::appstreamPyYAML, python38-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.5.0+10721+14d8e0d5RHSA-2022:1764
Red Hatenterprise_linux:8::appstreambabel, python2-babel0:2.5.1-10.module+el8.5.0+11014+88fc0d0bRHSA-2022:1821
Red Hatenterprise_linux:8::appstreambabel, python38-babel0:2.7.0-11.module+el8.5.0+11015+9c1c7c42RHSA-2022:1764
Red Hatenterprise_linux:8::appstreammod_wsgi, python38-mod_wsgi0:4.6.8-3.module+el8.4.0+8888+89bc7e79RHSA-2022:1764
Red Hatenterprise_linux:8::appstreamnumpy, python2-numpy, numpy-debugsource and 3 more1:1.14.2-16.module+el8.4.0+9406+221a4565RHSA-2022:1821
Red Hatenterprise_linux:8::appstreamnumpy, python38-numpy, numpy-debugsource and 3 more0:1.17.3-6.module+el8.5.0+12205+a865257aRHSA-2022:1764
Red Hatenterprise_linux:8::appstreampytest, python2-pytest0:3.4.2-13.module+el8.1.0+3111+de3f2d8eRHSA-2022:1821
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python2-PyMySQL0:0.8.0-10.module+el8.1.0+3111+de3f2d8eRHSA-2022:1821
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python38-PyMySQL0:0.10.1-1.module+el8.4.0+9692+8e86ab84RHSA-2022:1764
77 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Desktop Applications 15 SP3, Linux Enterprise Module for Python 2 15 SP3 and 1 morepython2.7.18-150000.38.1SUSE-SU-2022:1091-1
SUSELinux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Python 2 15 SP3, Linux Enterprise Real Time 15 SP2python-base2.7.18-150000.38.2SUSE-SU-2022:1091-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5 and 1 morepython33.4.10-25.85.2SUSE-SU-2022:0882-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5 and 1 morepython3-base3.4.10-25.85.1SUSE-SU-2022:0882-1
SUSELinux Enterprise Server 12 SP4-LTSS, Linux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP4 and 3 morepython, python-doc, python-base2.7.18-33.8.1SUSE-SU-2022:1140-1
SUSELinux Enterprise Workstation Extension 12 SP5python-base2.7.18-33.8.1SUSE-SU-2022:1140-1
openSUSELeap 15.3python, python-doc2.7.18-150000.38.1openSUSE-SU-2022:1091-1
openSUSELeap 15.3python-base2.7.18-150000.38.2openSUSE-SU-2022:1091-1
openSUSETumbleweedpython2.7.18-16.1openSUSE-SU-2024:11839-1
AlmaLinux8babel, python2-babel2.5.1-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python-nose-docs1.3.7-31.module_el8.5.0+2569+5c5719bcALSA-2022:1821
AlmaLinux8python-sqlalchemy-doc1.3.2-2.module_el8.5.0+2569+5c5719bcALSA-2022:1821
AlmaLinux8python2, python2-libs, python2-test and 4 more2.7.18-10.module_el8.6.0+2781+fed64c13.almaALSA-2022:1821
AlmaLinux8python2-Cython0.28.1-7.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-PyMySQL0.8.0-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-attrs17.4.0-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-backports1.0-16.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-backports-ssl_match_hostname3.5.0.1-12.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-bson, python2-pymongo, python2-pymongo-gridfs3.7.0-1.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-chardet3.0.4-10.module_el8.6.0+2781+fed64c13ALSA-2022:1821
AlmaLinux8python2-coverage4.5.1-4.module_el8.6.0+2781+fed64c13ALSA-2022:1821
70 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.28.1-7.module+el8.4.0+403+9ae17a31RLSA-2022:1821
Rocky Linux8Cython0:0.28.1-7.module+el8.5.0+706+735ec4b3RLSA-2022:1821
Rocky Linux8Cython0:0.29.14-4.module+el8.4.0+570+c2eaf144RLSA-2022:1764
Rocky Linux8PyYAML0:3.12-16.module+el8.4.0+403+9ae17a31RLSA-2022:1821
Rocky Linux8PyYAML0:3.12-16.module+el8.5.0+706+735ec4b3RLSA-2022:1821
Rocky Linux8PyYAML0:5.4.1-1.module+el8.4.0+574+843c4898RLSA-2022:1764
Rocky Linux8PyYAML0:5.4.1-1.module+el8.5.0+672+ab6eb015RLSA-2022:1764
Rocky Linux8babel0:2.5.1-10.module+el8.5.0+706+735ec4b3RLSA-2022:1821
Rocky Linux8babel0:2.7.0-11.module+el8.5.0+672+ab6eb015RLSA-2022:1764
Rocky Linux8mod_wsgi0:4.6.8-3.module+el8.4.0+570+c2eaf144RLSA-2022:1764
Rocky Linux8numpy0:1.17.3-6.module+el8.5.0+672+ab6eb015RLSA-2022:1764
Rocky Linux8numpy1:1.14.2-16.module+el8.4.0+403+9ae17a31RLSA-2022:1821
88 more for Rocky Linux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Versions of python36:3.6/python36 as shipped with Red Hat Enterprise Linux 8 are marked as 'Not affected' as they just provide "symlinks" to the main python3 component, which provides the actual interpreter of the Python programming language.

This attack is theoretical and must be chained together with another vulnerability to have any effect on the system. The URL parsing method not sanitizing input and allowing characters such as '\r' & '\n' is not a vulnerability in and of itself, which is why the impact has been marked as moderate

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8python38:3.8-8060020220120164031.5294be16Fixed 2022-05-10RHSA-2022:1764
Red Hat Enterprise Linux 8python38-devel:3.8-8060020220120164031.5294be16Fixed 2022-05-10RHSA-2022:1764
Red Hat Enterprise Linux 8python27:2.7-8060020220210185952.8cdc2268Fixed 2022-05-10RHSA-2022:1821
Red Hat Enterprise Linux 8python3-0:3.6.8-47.el8_6Fixed 2022-09-13RHSA-2022:6457
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-babel-0:2.7.0-12.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-0:3.8.11-2.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-cryptography-0:2.8-5.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-jinja2-0:2.10.3-6.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-lxml-0:4.4.1-7.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-pip-0:19.3.1-2.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-urllib3-0:1.25.7-7.el7Fixed 2021-08-24RHSA-2021:3254
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-python-0:2.7.18-4.el7Fixed 2022-05-02RHSA-2022:1663
Red Hat Enterprise Linux 6pythonOut of support scope
Red Hat Enterprise Linux 7pythonOut of support scope
Red Hat Enterprise Linux 7python3Out of support scope
Red Hat Enterprise Linux 8gimp:flatpak/python2Will not fix
Red Hat Enterprise Linux 8inkscape:flatpak/python2Affected
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Enterprise Linux 8python39:3.9/python39Affected
Red Hat Enterprise Linux 9python3.9Not affected
7 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-0391.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON