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
Ubuntu

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)

Potential Mitigations

References