CVE-2026-140868: Proxy-Authorization header not stripped on cross-origin redirects leaks proxy credentials

Published Dec 4, 2026
·
Updated

When following a redirect to a different origin, httpx2 removes the Authorization and Cookie headers but keeps Proxy-Authorization. A client that sets Proxy-Authorization in its client or request headers sends that credential to the redirect target, where an attacker who controls the redirecting response, or an on-path attacker on plain HTTP, can capture it.

Applications are affected when all of the following hold: followredirects=True is set (the default is False), Proxy-Authorization is passed in headers rather than through the proxy parameter, and the redirect target is not reached through the same forward proxy that consumed the header on the first request. Proxy credentials given in the proxy URL are not affected. Affected versions are httpx2 before 2.18.0.

The issue is fixed in 2.18.0, which removes Proxy-Authorization whenever a redirect changes origin. Until then, give proxy credentials in the proxy URL instead of a header, or leave followredirects off.

Affected Software

1 affected component
pypi/httpx2<2.18.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.18.0
  2. Configuration

    Pass proxy credentials in the proxy URL instead of in client or request headers.

    httpx2 proxy credentials = proxy URL
  3. Configuration

    Leave follow_redirects off.

    httpx2 follow_redirects = false

Event History

Dec 4, 2026
CVE Published
via MITRE·11:28 AM
Data Sourced
via MITRE·11:28 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Are applications using the default redirect behavior affected?

No. The default for follow_redirects is False. Exposure requires explicitly enabling follow_redirects=True.

2

Which proxy authentication configurations are exposed?

Only applications that supply Proxy-Authorization as a client or request header are affected. Credentials embedded in the proxy URL are not affected.

3

What conditions must occur for credentials to leak?

A cross-origin redirect must be followed, and the redirect target must not be reached through the same forward proxy that consumed the header on the initial request. An attacker can capture the credential by controlling the redirect response or by being on path for plain HTTP.

4

What can be done before upgrading?

Provide proxy credentials in the proxy URL rather than in a Proxy-Authorization header, or disable redirect following. Upgrade to httpx2 2.18.0 or later when possible.

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