GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Proxy digest credentials can leak to origin via 407 inside CONNECT tunnel · Issue #2457 · yhirose/cpp-httplib Closed DescriptionSummaryWhen This is not related to PR #2448 — that PR only fixed the Reproduction```cpp cli.Get("/x"); Root cause`httplib.h` around line 13195 (the 401/407 retry block under `#ifdef CPPHTTPLIB_SSL_ENABLED`) dispatches on response status alone: ```cpp `is_proxy_enabled_for_host(host_)` returns true for the in-tunnel case (proxy is configured, host is not in NO_PROXY), so the new guard does not fire. Response status is attacker-controlled, so origin can extract proxy creds simply by returning 407. Why other libraries don't have thiscurl, Python `requests`, Go `net/http`, JDK `HttpClient` either don't auto-retry on 401/407, or they pair the status with connection context (was this response received from the proxy hop or from the origin via tunnel?) before deciding which credential bucket to use. Suggested fixTrack whether the current `Stream`/connection represents an established CONNECT tunnel to the origin (vs. a plain proxy connection). When an inner-tunnel response returns 407, do not enter the proxy-digest retry path — propagate the 407 to the caller. Rough shape: ```cpp Severity
Not a zero-day, but the proxy credentials are exactly the kind of long-lived secret users don't expect to leak to arbitrary upstream servers. ScopePre-existing. Surfaced during code review of #2448 but explicitly out of that PR's scope. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |