CVE-2019-9948CWE-22path-traversal

CVE-2019-9948

Critical · published March 23, 2019

CVSS v3.1
9.1
EPSS
12%
Percentile
96.1
In the wild
Unconfirmed
What it is

⚠️ A sneaky flaw in Python's urllib could let attackers access local files with just a crafty URL! This is like finding a backdoor into a secured building using a cleverly disguised invitation! 🔍 Imagine a hotel where someone finds a secret door behind a bookshelf that leads directly to the staff's private rooms. That’s what this vulnerability does for attackers—bypasses security measures to peek into sensitive files! If exploited, an attacker could easily read critical system files, like '/etc/passwd', which contains user account information. This could lead to unauthorized access and potentially compromise the entire system. It’s a surprisingly simple way to gain insight into sensitive data, making it a risk to keep an eye on!

Put simply

Imagine a hotel where someone finds a secret door behind a bookshelf that leads directly to the staff's private rooms. That’s what this vulnerability does for attackers—bypasses security measures to peek into sensitive files! This vulnerability allows urllib in Python 2.x (up to 2.7.16) to support the 'local_file:' scheme, enabling attackers to bypass blacklists that would normally prevent access to 'file:' URIs. An attacker can construct a URL that prompts urllib to access local files on the server.

What to do

If exploited, an attacker could easily read critical system files, like '/etc/passwd', which contains user account information. This could lead to unauthorized access and potentially compromise the entire system. It’s a surprisingly simple way to gain insight into sensitive data, making it a risk to keep an eye on! To mitigate this risk, switch to Python 3.x, where this issue is no longer present. If migration isn't possible, ensure that all inputs are strictly validated and consider implementing additional checks to block 'local_file:' access. Don't let your guard down! You've got this! Follow these steps and your system will be much safer in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.11844 · 96.1th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2019-03-23T22:29Z
Affected products (29)
ProductVersionsFixed in
python/python≥ 2.0, < 2.7.172.7.17
python/python≥ 3.5.0, < 3.5.83.5.8
python/python≥ 3.6.0, < 3.6.93.6.9
python/python≥ 3.7.0, < 3.7.43.7.4
opensuse/leapall versions—
opensuse/leapall versions—
debian/debian_linuxall versions—
debian/debian_linuxall versions—
fedoraproject/fedoraall versions—
fedoraproject/fedoraall versions—
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
redhat/enterprise_linux_desktopall versions—
redhat/enterprise_linux_desktopall versions—
redhat/enterprise_linux_eusall versions—
redhat/enterprise_linux_eusall versions—
redhat/enterprise_linux_eusall versions—
redhat/enterprise_linux_eusall versions—
redhat/enterprise_linux_serverall versions—
redhat/enterprise_linux_serverall versions—
redhat/enterprise_linux_server_eusall versions—
redhat/enterprise_linux_tusall versions—
redhat/enterprise_linux_tusall versions—
redhat/enterprise_linux_tusall versions—
redhat/enterprise_linux_workstationall versions—
redhat/enterprise_linux_workstationall versions—
References (45)
http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00092.html · [email protected]http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00050.html · [email protected]http://packetstormsecurity.com/files/154927/Slackware-Security-Advisory-python-Updates.html · [email protected]http://www.securityfocus.com/bid/107549 · [email protected]https://access.redhat.com/errata/RHSA-2019:1700 · [email protected]https://access.redhat.com/errata/RHSA-2019:2030 · [email protected]https://access.redhat.com/errata/RHSA-2019:3335 · [email protected]https://access.redhat.com/errata/RHSA-2019:3520 · [email protected]https://bugs.python.org/issue35907 · [email protected]https://github.com/python/cpython/pull/11842 · [email protected]https://lists.apache.org/thread.html/r1b103833cb5bc8466e24ff0ecc5e75b45a705334ab6a444e64e840a0%40%3Cissues.bookkeeper.apache.org%3E · [email protected]https://lists.debian.org/debian-lts-announce/2019/06/msg00022.html · [email protected]https://lists.debian.org/debian-lts-announce/2019/07/msg00011.html · [email protected]https://lists.debian.org/debian-lts-announce/2020/07/msg00011.html · [email protected]https://lists.debian.org/debian-lts-announce/2020/08/msg00034.html · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQEQLXLOCR3SNM3AA5RRYJFQ5AZBYJ4L/ · [email protected]https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRYFIMISZ47NTAU3XWZUOFB7CYL62KES/ · [email protected]https://seclists.org/bugtraq/2019/Oct/29 · [email protected]https://security.gentoo.org/glsa/202003-26 · [email protected]https://security.netapp.com/advisory/ntap-20190404-0004/ · [email protected]https://usn.ubuntu.com/4127-1/ · [email protected]https://usn.ubuntu.com/4127-2/ · [email protected]http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00092.html · af854a3a-2127-422b-91ae-364da2661108http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00050.html · af854a3a-2127-422b-91ae-364da2661108http://packetstormsecurity.com/files/154927/Slackware-Security-Advisory-python-Updates.html · af854a3a-2127-422b-91ae-364da2661108http://www.securityfocus.com/bid/107549 · af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/errata/RHSA-2019:1700 · af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/errata/RHSA-2019:2030 · af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/errata/RHSA-2019:3335 · af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/errata/RHSA-2019:3520 · af854a3a-2127-422b-91ae-364da2661108https://bugs.python.org/issue35907 · af854a3a-2127-422b-91ae-364da2661108https://github.com/python/cpython/pull/11842 · af854a3a-2127-422b-91ae-364da2661108https://lists.apache.org/thread.html/r1b103833cb5bc8466e24ff0ecc5e75b45a705334ab6a444e64e840a0%40%3Cissues.bookkeeper.apache.org%3E · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2019/06/msg00022.html · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2019/07/msg00011.html · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2020/07/msg00011.html · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2020/08/msg00034.html · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HQEQLXLOCR3SNM3AA5RRYJFQ5AZBYJ4L/ · af854a3a-2127-422b-91ae-364da2661108https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KRYFIMISZ47NTAU3XWZUOFB7CYL62KES/ · af854a3a-2127-422b-91ae-364da2661108https://seclists.org/bugtraq/2019/Oct/29 · af854a3a-2127-422b-91ae-364da2661108https://security.gentoo.org/glsa/202003-26 · af854a3a-2127-422b-91ae-364da2661108https://security.netapp.com/advisory/ntap-20190404-0004/ · af854a3a-2127-422b-91ae-364da2661108https://usn.ubuntu.com/4127-1/ · af854a3a-2127-422b-91ae-364da2661108https://usn.ubuntu.com/4127-2/ · af854a3a-2127-422b-91ae-364da2661108https://cert-portal.siemens.com/productcert/html/ssa-398330.html · 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
EPSS history
Timeline
  • 23 MAR 17:07Z
    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…
    cvelistv5