CVE-2018-18074 is a high-severity (CVSS 7.5) CWE-522 vulnerability in requests. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for requests — see the affected versions and patch details below.
Insufficiently Protected Credentials in Requests
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
requestsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | requests | all versions | 2.20.0pip install --upgrade 'requests==2.20.0' |
Affected Products
ubuntu linuxcanonicalleapopensuserequestspythonenterprise linux desktopredhatenterprise linux serverredhatenterprise linux workstationredhatResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for requests, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update requests to 2.20.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-18074 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Tower 3.5 for RHEL 7 | ansible-tower-35/ansible-tower:3.5.6-1 | RHBA-2020:1539 |
| Red Hat Ansible Tower 3.6 for RHEL 7 | ansible-tower-36/ansible-tower:3.6.4-1 | RHBA-2020:1540 |
| Red Hat Enterprise Linux 7 | python-requests-0:2.6.0-5.el7 | RHSA-2019:2035 |
| Red Hat Enterprise Linux 7 | python-pip-0:9.0.3-7.el7_7 | RHSA-2020:0850 |
| Red Hat Enterprise Linux 7 | python-virtualenv-0:15.1.0-4.el7_7 | RHSA-2020:0851 |
| Red Hat Enterprise Linux 7 | python-pip-0:9.0.3-7.el7_8 | RHSA-2020:2068 |
| Red Hat Enterprise Linux 7 | python-virtualenv-0:15.1.0-4.el7_8 | RHSA-2020:2081 |
| Red Hat Enterprise Linux 8 | python27:2.7-8020020200117110429.90f98d4f | RHSA-2020:1605 |
Frequently Asked Questions
Is CVE-2018-18074 in your dependencies?
Find it across PyPI, including transitive dependencies.