SB2019031318 - Multiple vulnerabilities in Python
Published: March 13, 2019 Updated: July 20, 2020
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 3 secuirty vulnerabilities.
1) CRLF injection (CVE-ID: CVE-2019-9740)
The vulnerability allows a remote attacker to perform CRLF injection attacks.
The vulnerability exists within urllib2 implementation for Python 2.x and urllib3 implementation for Python 3.x when processing the path component of a URL after the "?" character within the urllib.request.urlopen() call. A remote attacker with ability to control URL, passed to the application, can use CRLF sequences to split the HTTP request and inject arbitrary HTTP headers into request, made by the application.
2) CRLF injection (CVE-ID: CVE-2019-9947)
The vulnerability allows a remote attacker to perform CRLF injection attacks.
The vulnerability exists within urllib2 implementation for Python 2.x and urllib3 implementation for Python 3.x when processing the path component of a URL that lacks the "?" character within the urllib.request.urlopen() call. A remote attacker with ability to control URL, passed to the application, can use CRLF sequences to split the HTTP request and inject arbitrary HTTP headers into request, made by the application.
3) Exposed dangerous method or function (CVE-ID: CVE-2019-9948)
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') Remediation
Install update from vendor's website.
References
- http://www.securityfocus.com/bid/107466
- https://access.redhat.com/errata/RHSA-2019:1260
- https://bugs.python.org/issue36276
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JMWSKTNOHSUOT3L25QFJAVCFYZX46FYK/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JXASHCDD4PQFKTMKQN4YOP5ZH366ABN4/
- https://bugs.python.org/issue35906
- https://security.netapp.com/advisory/ntap-20190404-0004/
- https://bugs.python.org/issue35907
- https://github.com/python/cpython/pull/11842
- https://github.com/python/cpython/commit/4fe82a8eef7aed60de05bfca0f2c322730ea921e
- https://github.com/python/cpython/commit/4f06dae5d8d4400ba38d8502da620f07d4a5696e
- https://github.com/python/cpython/commit/34bab215596671d0dec2066ae7d7450cd73f638b