Exposed dangerous method or function in Python - CVE-2019-9948

 

Exposed dangerous method or function in Python - CVE-2019-9948

Published: June 19, 2019 / Updated: July 20, 2020


Vulnerability identifier: #VU18827
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/U:Green
CVE-ID: CVE-2019-9948
CWE-ID: CWE-749
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Python.org
Affected software:
Python

Detailed vulnerability description

The vulnerability allows a remote attacker to bypass certain security restrictions.

The vulnerability exists due to urllib implementation in Python 2.x supports the local_file: scheme. An attacker with ability to control input data, such as URL, can bypass protection mechanisms that blacklist file: URIs and view contents of arbitrary file on the system.

PoC:

urllib.urlopen('local_file:///etc/passwd')

How to mitigate CVE-2019-9948

Install update from vendor's website.

Sources