Executive brief
A vulnerability in the libcurl library, which is widely used by applications to transfer data over networks, could allow sensitive authentication information to be leaked. When an application reuses a connection handle to talk to different proxy servers, it may accidentally send the login credentials intended for the first proxy to the second one. This could allow a malicious proxy operator to impersonate the user or gain unauthorized access to other network resources.
Technical details
A flaw in libcurl's handle reuse logic occurs when sequential transfers are configured via environment variables. If an initial transfer uses Digest authentication with a specific proxy, libcurl fails to reset the authentication state before a subsequent transfer. If the second transfer is routed through a different proxy, the 'Proxy-Authorization' header containing the authenticated state for the first proxy is leaked to the second. This is classified as CWE-294 (Authentication Bypass by Capture-replay). The vulnerability affects libcurl but not the curl command-line tool. Users are advised to upgrade to version 8.21.0 or avoid handle reuse when switching proxies.
Affected products
- curl libcurl 7.12.0 to 8.20.0
Timeline
- 2026-05-18: disclosed: Reported to the curl project via HackerOne
- 2026-06-24: patched: Fixed in curl version 8.21.0
- 2026-06-24: advisory: Project advisory published