DescriptionA 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python2.7 (PTS)buster2.7.16-2+deb10u1vulnerable
buster (security)2.7.16-2+deb10u2vulnerable
python3.7 (PTS)buster3.7.3-2+deb10u3vulnerable
buster (security)3.7.3-2+deb10u4vulnerable
python3.9 (PTS)bullseye3.9.2-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs


[bullseye] - python3.9 <no-dsa> (Minor issue)
[buster] - python3.7 <ignored> (Minor issue, different approach to sanitization; regressions reports)
[bullseye] - python2.7 <ignored> (Unsupported in Bullseye, only included to build a few applications)
[buster] - python2.7 <ignored> (Minor issue, different approach to sanitization; regressions reports)
Regressions reported for django, boto-core and cloud-init
Fixed by: (v3.10.0b1)
Followup for 3.10.x: (v3.10.0b2)
Fixed by: (v3.9.5)
Followup for 3.9.x: (v3.9.6)
Fixed by: (v3.8.11)
Fixed by: (v3.7.11)
Fixed by: (v3.6.14)

Search for package or bug name: Reporting problems