urllib module local_file:// scheme

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.

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

Fixed In

Python issue

[security][CVE-2019-9948] Unnecessary URL scheme exists to allow 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: