CVE Vulnerabilities

CVE-2022-0391

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Published: Feb 09, 2022 | Modified: Nov 07, 2023
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:N/I:P/A:N
RedHat/V2
RedHat/V3
5.3 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Ubuntu
MEDIUM

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

The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.

Affected Software

Name Vendor Start Version End Version
Python Python * 3.6.14 (excluding)
Python Python 3.7.0 (including) 3.7.11 (excluding)
Python Python 3.8.0 (including) 3.8.11 (excluding)
Python Python 3.9.0 (including) 3.9.5 (excluding)
Python Python 3.10.0-alpha1 (including) 3.10.0-alpha1 (including)
Python Python 3.10.0-alpha2 (including) 3.10.0-alpha2 (including)
Python Python 3.10.0-alpha3 (including) 3.10.0-alpha3 (including)
Python Python 3.10.0-alpha4 (including) 3.10.0-alpha4 (including)
Python Python 3.10.0-alpha5 (including) 3.10.0-alpha5 (including)
Python Python 3.10.0-alpha6 (including) 3.10.0-alpha6 (including)
Red Hat Enterprise Linux 8 RedHat python38:3.8-8060020220120164031.5294be16 *
Red Hat Enterprise Linux 8 RedHat python38-devel:3.8-8060020220120164031.5294be16 *
Red Hat Enterprise Linux 8 RedHat python27:2.7-8060020220210185952.8cdc2268 *
Red Hat Enterprise Linux 8 RedHat python3-0:3.6.8-47.el8_6 *
Red Hat Enterprise Linux 8 RedHat python3-0:3.6.8-47.el8_6 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-babel-0:2.7.0-12.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-python-0:3.8.11-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-python-cryptography-0:2.8-5.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-python-jinja2-0:2.10.3-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-python-lxml-0:4.4.1-7.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-python-pip-0:19.3.1-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-python38-python-urllib3-0:1.25.7-7.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat python27-python-0:2.7.18-4.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-babel-0:2.7.0-12.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-python-0:3.8.11-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-python-cryptography-0:2.8-5.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-python-jinja2-0:2.10.3-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-python-lxml-0:4.4.1-7.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-python-pip-0:19.3.1-2.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS RedHat rh-python38-python-urllib3-0:1.25.7-7.el7 *
Python2.7 Ubuntu bionic *
Python2.7 Ubuntu esm-apps/focal *
Python2.7 Ubuntu esm-apps/jammy *
Python2.7 Ubuntu esm-infra/xenial *
Python2.7 Ubuntu focal *
Python2.7 Ubuntu impish *
Python2.7 Ubuntu jammy *
Python2.7 Ubuntu kinetic *
Python2.7 Ubuntu trusty *
Python2.7 Ubuntu trusty/esm *
Python2.7 Ubuntu xenial *
Python3.4 Ubuntu trusty *
Python3.4 Ubuntu trusty/esm *
Python3.5 Ubuntu esm-infra/xenial *
Python3.5 Ubuntu trusty *
Python3.5 Ubuntu trusty/esm *
Python3.5 Ubuntu xenial *
Python3.6 Ubuntu bionic *
Python3.7 Ubuntu bionic *
Python3.7 Ubuntu esm-apps/bionic *
Python3.8 Ubuntu bionic *
Python3.8 Ubuntu esm-apps/bionic *
Python3.8 Ubuntu focal *
Python3.9 Ubuntu trusty *
Python3.9 Ubuntu upstream *
Python3.9 Ubuntu xenial *

Potential Mitigations

References