CVE-2026-140868

my.netkarin.net
جزئیات آسیب‌پذیری
CVE-2026-140868 پایین CVSS 3.7
هدر Proxy-Authorization در تغییرمسیرهای cross-origin حذف نمی‌شود و اعتبار proxy افشا می‌شود
Proxy-Authorization header not stripped on cross-origin redirects leaks proxy credentials
فروشنده: Pydantic
تاریخ انتشار: 2026-12-04 11:28:13
Httpx2

توضیح (فارسی)

هنگام پیروی از یک تغییرمسیر به origin متفاوت، httpx2 هدرهای Authorization و Cookie را حذف می‌کند اما Proxy-Authorization را نگه می‌دارد. کلاینتی که Proxy-Authorization را در هدرهای کلاینت یا درخواست تنظیم کرده باشد، آن اعتبار را به هدف تغییرمسیر ارسال می‌کند، جایی که مهاجم کنترل‌کننده پاسخ تغییرمسیر، یا مهاجم on-path در HTTP ساده، می‌تواند آن را دزدی کند. برنامه‌ها زمانی تحت تأثیر قرار می‌گیرند که تمام موارد زیر برقرار باشند: follow_redirects=True تنظیم شده باشد (مقدار پیش‌فرض False است)، Proxy-Authorization در هدرها به جای پارامتر proxy منتقل شده باشد، و هدف تغییرمسیر از طریق همان forward proxy که هدر را در اولین درخواست مصرف کرده است، قابل دسترسی نباشد. اعتبارهای proxy داده شده در proxy URL تحت تأثیر قرار نمی‌گیرند. نسخه‌های تحت تأثیر httpx2 قبل از 2.18.0 هستند. مشکل در نسخه 2.18.0 رفع شده است، که Proxy-Authorization را هرگاه تغییرمسیر origin را تغییر دهد، حذف می‌کند. تا آن زمان، اعتبارهای proxy را در proxy URL به جای هدر بدهید، یا follow_redirects را غیرفعال بگذارید.

Original description (English)

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: follow_redirects=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 follow_redirects off.

3.7 امتیاز CVSS
1.0٪ احتمال بهره‌برداری (EPSS)
— تاریخ گزارش بهره‌برداری
— تاریخ ثبت در CISA