CVE-2018-18074 Insufficiently Protected Credentials in Requests

High 7.5 Published Updated

Attackers can sniff network traffic to steal credentials when the library sends Authorization headers over insecure HTTP redirects.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-18074?

CVE-2018-18074 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 9 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-522

Which versions are affected by CVE-2018-18074?

3 open source packages ship an affected version, including requests. It affects 6 products.

PackageAffectedFixed in
requests PyPIAll versions2.20.0
requests PyPIAll versions2.20.0
requests PyPIAll versions2.20.0
Linux distribution packages (37)
python3-requests AlmaLinux:8All versions2.20.0-2.1.el8_1
python-requests Red Hat:enterprise_linux:7::clientAll versions0:2.6.0-5.el7
python-requests Red Hat:enterprise_linux:7::computenodeAll versions0:2.6.0-5.el7
python-requests Red Hat:enterprise_linux:7::serverAll versions0:2.6.0-5.el7
python-requests Red Hat:enterprise_linux:7::workstationAll versions0:2.6.0-5.el7
python-PyYAML SUSE:Enterprise Storage 5All versions5.1.2-26.9.4
python-asn1crypto SUSE:Enterprise Storage 5All versions0.24.0-2.5.1
python-packaging SUSE:Enterprise Storage 5All versions17.1-2.5.1
python-PyYAML SUSE:HPE Helion OpenStack 8All versions5.1.2-26.9.4
python-asn1crypto SUSE:HPE Helion OpenStack 8All versions0.24.0-2.5.1
python-botocore SUSE:HPE Helion OpenStack 8All versions1.12.213-28.12.1
python-jsonpatch SUSE:HPE Helion OpenStack 8All versions1.1-10.4.1
python-jsonpointer SUSE:HPE Helion OpenStack 8All versions1.0-10.3.1
python-packaging SUSE:HPE Helion OpenStack 8All versions17.1-2.5.1
python-requests SUSE:HPE Helion OpenStack 8All versions2.11.1-6.31.1
python-PyYAML SUSE:Linux Enterprise High Availability Extension 12 SP1All versions5.1.2-26.9.4
python-asn1crypto SUSE:Linux Enterprise High Availability Extension 12 SP1All versions0.24.0-2.5.1
python-packaging SUSE:Linux Enterprise High Availability Extension 12 SP1All versions17.1-2.5.1
python-pyparsing SUSE:Linux Enterprise High Availability Extension 12 SP1All versions2.2.0-7.6.1
python-PyYAML SUSE:Linux Enterprise High Availability Extension 12 SP2All versions5.1.2-26.9.4
python-requests SUSE:Linux Enterprise High Availability Extension 12 SP3All versions2.11.1-6.31.1
python-requests SUSE:Linux Enterprise High Availability Extension 12 SP4All versions2.11.1-6.31.1
python-requests SUSE:Linux Enterprise High Availability Extension 12 SP5All versions2.20.1-8.7.7
python-requests SUSE:Linux Enterprise High Performance Computing 15-ESPOSAll versions2.18.4-150000.3.3.1
python-requests SUSE:Linux Enterprise High Performance Computing 15-LTSSAll versions2.18.4-150000.3.3.1
python-PyYAML SUSE:Linux Enterprise Module for Advanced Systems Management 12All versions5.1.2-26.9.4
python-requests SUSE:Linux Enterprise Module for Advanced Systems Management 12All versions2.11.1-6.31.1
python-requests SUSE:Linux Enterprise Module for Basesystem 15 SP1All versions2.20.1-6.3.2
python-PyYAML SUSE:Linux Enterprise Module for Containers 12All versions5.1.2-26.9.4
python-PyYAML SUSE:Linux Enterprise Module for Public Cloud 12All versions5.1.2-26.9.4
python-aws-sam-translator SUSE:Linux Enterprise Module for Public Cloud 12All versions1.11.0-2.3.1
python-boto3 SUSE:Linux Enterprise Module for Public Cloud 12All versions1.9.213-14.9.1
python-botocore SUSE:Linux Enterprise Module for Public Cloud 12All versions1.12.213-28.12.1
python-cfn-lint SUSE:Linux Enterprise Module for Public Cloud 12All versions0.21.4-2.3.1
python-docutils SUSE:Linux Enterprise Module for Public Cloud 12All versions0.15.2-3.4.2
python-functools32 SUSE:Linux Enterprise Module for Public Cloud 12All versions3.2.3.2-2.6.1
python-jsonpatch SUSE:Linux Enterprise Module for Public Cloud 12All versions1.1-10.4.1

Products include Canonical Ubuntu Linux, Opensuse Leap, Python Requests, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Workstation.

How do I fix CVE-2018-18074?

Upgrade requests to 2.20.0 or later.

Is CVE-2018-18074 being exploited?

There is no known exploitation of CVE-2018-18074 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as ALBA-2019:3693, DEBIAN-CVE-2018-18074, GHSA-x84v-xcm2-53pg, MGASA-2018-0475, PYSEC-2018-28, RHSA-2019:2035 and 11 more.

Is CVE-2018-18074 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free