PSF-2019-12: Critical severity Python Software Foundation urllib vulnerability

Published Mar 23, 2019
·
Updated

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

Affected Software

1 affected component
Python Software Foundation urllib<=2.7.16

Event History

Mar 23, 2019
CVE Published
via OSV·06:29 PM
Data Sourced
via OSV·06:29 PM
DescriptionSeverity

Frequently Asked Questions

1

What condition must exist for an attacker to exploit this issue?

The attacker must be able to cause application code to call urllib.urlopen() with an attacker-controlled URL or otherwise influence the URL scheme. Exploitation relies on a protection mechanism that blocks file: URIs but does not also block the local_file: scheme.

2

Which systems are affected?

The affected component is urllib in Python 2.x through Python 2.7.16. The issue is relevant to applications using those versions that rely on file: URI blacklisting as a defense against local-file access.

3

How can teams identify potentially exposed code?

Review Python 2.x code for urllib.urlopen() calls that receive untrusted or externally controlled URLs. Pay particular attention to filters that reject file: URLs without rejecting local_file: URLs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203