Skip to main content
No exploitation reportedFix available

CVE-2022-0391

No exploitation reported by the sources we read.

  • Published2022-02-09
  • Fixed in3.9.5 · 3.8.11 · 3.7.11 · 3.6.14
  • WeaknessCWE-74

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-02-0923:15CVE publishedNVD

Versions per branch

NVD · OSV
Python
BranchAffectedFixed in
3.9≥ 3.9.0, < 3.9.53.9.5
3.8≥ 3.8.0, < 3.8.113.8.11
3.7≥ 3.7.0, < 3.7.113.7.11
3.6< 3.6.143.6.14
3.10= 3.10.0no fix published
Fedoraproject fedora
BranchAffectedFixed in
34.x= 34no fix published
35.x= 35no fix published
Oracle http server
BranchAffectedFixed in
12.2= 12.2.1.3.0no fix published
12.2= 12.2.1.4.0no fix published

7 more products in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As redhat, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • python
    Affected
    • = python 3.10.0b1, python 3.9.5, python 3.8.11, python 3.7.11, python 3.6.14no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2023-09-20

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • babelTuxCare:CentOS:8.5all versions · fixed in 2.5.1-10.module_el8.5.0+2050+77770ab7and 1 other package
  • babelTuxCare:CentOS:8.4all versions · fixed in 2.5.1-9.module_el8.4.0+2051+0b56c8deand 1 other package
  • babelRocky Linux:8all versions · fixed in 0:2.5.1-10.module+el8.5.0+706+735ec4b3
  • babelRocky Linux:8all versions · fixed in 0:2.7.0-11.module+el8.5.0+672+ab6eb015
  • babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.5.1-10.module+el8.5.0+11014+88fc0d0band 1 other package
  • babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.7.0-11.module+el8.5.0+11015+9c1c7c42and 1 other package
  • babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
  • CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.4.0+403+9ae17a31

416 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-0391 Red Hat Product Security719 products fixed · 98 known affected

    python: urllib.parse does not sanitize URLs containing ASCII newline and tabs

    python as a component of Red Hat Enterprise Linux 6 · python-devel as a component of Red Hat Enterprise Linux 6 · python-libs as a component of Red Hat Enterprise Linux 6 · +95 more

  • ICSA-23-348-10 CISA5 known affected

    Siemens SIMATIC S7-1500

    SIMATIC 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) · +2 more

  • SSA-398330 Siemens ProductCERT5 known affected

    SSA-398330: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP >= V3.1.0 and < V3.1.5

    SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.0 < V3.1.5 · +2 more

  • RHSA-2022:6457 Red Hat Product Security56 products fixed

    Red Hat Security Advisory: python3 security update

  • RHSA-2022:1821 Red Hat Product Security264 products fixed

    Red Hat Security Advisory: python27:2.7 security update

  • RHSA-2022:1764 Red Hat Product Security239 products fixed

    Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update

2 more advisories

Full record on NVD

Fix

  1. Update Python to 3.9.5 · 3.8.11 · 3.7.11 · 3.6.14
  2. Vendor fix Siemens ProductCERT SSA-398330 · 1 productUpdate to V3.1.5 or later version
  3. Vendor fix CISA ICSA-23-348-10 · 5 productsUpdate to V3.1.5 or later version
  4. Vendor fix Red Hat Product Security RHSA-2022:6457 · 56 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  5. Workaround from the vendor Red Hat Product Security RHSA-2022:6457 · 56 productsMitigation 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.
  6. Mitigation from the vendor CISA ICSA-23-348-10 · 5 productsOnly build and run applications from trusted sources.
  7. No fix available, says the vendor Red Hat Product Security CVE-2022-0391 · 67 productsAffected

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Published
2022-02-09
Last modified
2026-10-14
NVD status
Modified
GitHub advisory
GHSA-75jm-2xrg-5wpf

Frequently asked questions

What is CVE-2022-0391?

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.

Is CVE-2022-0391 actively exploited?

Active exploitation of CVE-2022-0391 has not been confirmed. Its EPSS score was 8.7% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-0391?

CVE-2022-0391 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.

Running Python? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record