CVE-2022-0391
python: urllib.parse does not sanitize URLs containing ASCII newline and tabs
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 18, 2021
Updated · November 2, 2026
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.
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
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
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.
CVSS / CWE
CVSS 3.1 · 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component