urllib module local_file:// scheme

Warning

This resource is maintained for historical reference and does not contain the latest vulnerability info for Python.

The canonical database for vulnerabilities affecting Python is available on GitHub in the Open Source Vulnerability (OSV) format. This vulnerability can be viewed online at the Open Source Vulnerability Database.

urllib in Python 2.x through 2.7.16 supports the local_file: scheme, which makes it easier for remote attackers to bypass protection mechanisms that blacklist file: URIs, as demonstrated by triggering a urllib.urlopen('local_file:///etc/passwd') call.

Dates:

  • Disclosure date: 2019-02-06 (Python issue bpo-35907 reported)

Fixed In

Python issue

[security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib.

  • Python issue: bpo-35907
  • Creation date: 2019-02-06
  • Reporter: Sihoon Lee

CVE-2019-9948

urllib in Python 2.x through 2.7.16 supports the local_file: scheme, which makes it easier for remote attackers to bypass protection mechanisms that blacklist file: URIs, as demonstrated by triggering a urllib.urlopen(‘local_file:///etc/passwd’) call.

Timeline

Timeline using the disclosure date 2019-02-06 as reference: