CVE-2019-18348: An issue was discovered in urllib2 in Python 2.x through 2.7.17 and urllib in Python 3.x through 3.8.0.

Medium CVSS 6.1

CVE id
CVE-2019-18348
Published
Last modified

Affected packages

PackageAffected versionsFixed in
Python
Runtimes and servers
>= 2.0, <= 2.7.17
>= 3.0, < 3.5.10
>= 3.6.0, < 3.6.11
>= 3.7.0, < 3.7.8
>= 3.8.0, < 3.8.3
3.5.10, 3.6.11, 3.7.8, 3.8.3

How to fix it

Upgrade Python to the fixed release of the line you run: 3.5.10, 3.6.11, 3.7.8, 3.8.3.

python --version
  • Install the patched Python release of your minor line (pyenv, the python image tag, or your OS packages) and recreate virtual environments.

A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.

Details

An issue was discovered in urllib2 in Python 2.x through 2.7.17 and urllib in Python 3.x through 3.8.0. CRLF injection is possible if the attacker controls a url parameter, as demonstrated by the first argument to urllib.request.urlopen with \r\n (specifically in the host component of a URL) followed by an HTTP header. This is similar to the CVE-2019-9740 query string issue and the CVE-2019-9947 path string issue. (This is not exploitable when glibc has CVE-2016-10739 fixed.). This is fixed in: v2.7.18, v2.7.18rc1; v3.5.10, v3.5.10rc1; v3.6.11, v3.6.11rc1, v3.6.12; v3.7.8, v3.7.8rc1, v3.7.9; v3.8.3, v3.8.3rc1, v3.8.4, v3.8.4rc1, v3.8.5, v3.8.6, v3.8.6rc1.

References

Am I affected?

Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About this data

Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.