CVE-2018-18074: High severity Python Requests vulnerability

Published Jun 29, 2018
·
Updated

A credentials-exposure flaw was found in python-requests, where if a request with authentication is redirected (302) from an HTTPS endpoint to an HTTP endpoint on the same host, the Authorization header is not stripped and the credentials can be read in plain text. A man-in-the-middle attacker could exploit this flaw to obtain a user's valid credentials.

Other sources

Python Requests before version 2.20.0 does not remove the HTTP Authorization header when following a HTTPS to HTTP redirect, allowing for the potential transmission of user credentials in plaintext.

Upstream Patch:

https://github.com/requests/requests/commit/c45d7c49ea75133e52ab22a8e9e13173938e36ff

Upstream Issue:

https://github.com/requests/requests/pull/4718

Red Hat

The Requests package before 2.20.0 for Python sends an HTTP Authorization header to an http URI upon receiving a same-hostname https-to-http redirect, which makes it easier for remote attackers to discover credentials by sniffing the network.

The Requests package through 2.19.1 before 2018-09-14 for Python sends an HTTP Authorization header to an http URI upon receiving a same-hostname https-to-http redirect, which makes it easier for remote attackers to discover credentials by sniffing the network.

GitHub

Affected Software

18 affected componentsFixes available
redhat/python-requests<0:2.6.0-5.el7
0:2.6.0-5.el7
redhat/python-pip<0:9.0.3-7.el7_7
0:9.0.3-7.el7_7
redhat/python-virtualenv<0:15.1.0-4.el7_7
0:15.1.0-4.el7_7
redhat/python-pip<0:9.0.3-7.el7_8
0:9.0.3-7.el7_8
redhat/python-virtualenv<0:15.1.0-4.el7_8
0:15.1.0-4.el7_8
redhat/python-pip<0:9.0.3-16.el8
0:9.0.3-16.el8
redhat/python-requests<2.20.0
2.20.0
pip/requests<=2.19.1
2.20.0
Python Requests<2.20.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=18.10
openSUSE Leap=15.1
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Workstation=7.0
debian/requests
2.25.1+dfsg-22.28.1+dfsg-12.32.3+dfsg-52.32.5+dfsg-1

Event History

Jun 29, 2018
CVE Published
12:00 AM
Oct 9, 2018
CVE Published
via MITRE·03:00 PM
Data Sourced
via MITRE·03:00 PM
Description
Data Sourced
via NVD·05:29 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 29, 2018
Advisory Published
via GitHub·07:06 PM
Jan 11, 2024
Data Sourced
via Launchpad·10:55 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·06:03 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Debian·06:04 PM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID?

The vulnerability ID is CVE-2018-18074.

2

What is the severity of CVE-2018-18074?

The severity of CVE-2018-18074 is high with a CVSS score of 7.5.

3

How does CVE-2018-18074 affect python-requests?

CVE-2018-18074 affects python-requests version up to and excluding 2.20.0.

4

How can I fix CVE-2018-18074 in python-requests?

To fix CVE-2018-18074 in python-requests, upgrade to version 2.20.0 or higher.

5

Where can I find more information about CVE-2018-18074?

More information about CVE-2018-18074 can be found in the references section of the vulnerability report.

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