netrc and default credential leak
Description
When curl uses a .netrc file with a default entry missing both login and password, following HTTP redirects can leak the original host's password to the redirect target.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
When curl uses a .netrc file with a default entry missing both login and password, following HTTP redirects can leak the original host's password to the redirect target.
Vulnerability
Curl versions 7.76.0 through 8.11.1 inclusive are affected. When libcurl is configured to use a .netrc file for credentials and also to follow HTTP redirects, a specific misconfiguration allows password leakage. The flaw only occurs if the .netrc file contains a default entry that omits both login and password. Under normal operation, a default entry without credentials is used to skip authentication for unknown hosts; however, due to a logic error, the password from a preceding machine entry can be inherited and sent to the redirect target [1].
Exploitation
An attacker must control a server that receives a redirect from an initial host for which the .netrc file has a valid machine entry with credentials. The .netrc file must also have a default entry with no login and password. The attacker triggers the redirect (e.g., via a crafted response), and curllib sends the password from the first host to the second, potentially exposing it to the attacker-controlled server [1].
Impact
Successful exploitation leads to disclosure of the password used for the first host to a different host, violating the intended isolation between netrc entries. This is classified as CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. The severity is low because the required netrc misconfiguration is rare, and the attacker must already be in a position to control a redirect target [1].
Mitigation
Upgrade to curl version 8.12.0 or later. For versions prior to 8.11.0, apply the patches referenced in the advisory; additionally, commit 9bee39b is required for proper fix functionality in version 8.11.0. A workaround is to avoid using .netrc with redirects, or ensure no default entry exists with missing login and password [1].
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
39- osv-coords37 versionspkg:apk/chainguard/curlpkg:apk/chainguard/curl-devpkg:apk/chainguard/curl-docpkg:apk/chainguard/curl-oci-entrypointpkg:apk/chainguard/curl-staticpkg:apk/chainguard/libcurl4pkg:apk/chainguard/libcurl-openssl4pkg:apk/wolfi/curlpkg:apk/wolfi/curl-devpkg:apk/wolfi/curl-docpkg:apk/wolfi/curl-oci-entrypointpkg:apk/wolfi/curl-staticpkg:apk/wolfi/libcurl4pkg:apk/wolfi/libcurl-openssl4pkg:rpm/opensuse/curl&distro=openSUSE%20Leap%2015.6pkg:rpm/suse/curl&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-ESPOSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Installer%20Updates%2015%20SP4pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Installer%20Updates%2015%20SP5pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Micro%205.4pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Micro%205.5pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP5-LTSSpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%20LTSS%20Extended%20Security%2012%20SP5pkg:rpm/suse/curl&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/curl&distro=SUSE%20Manager%20Server%204.3
< 8.12.0-r0+ 36 more
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.12.0-r0
- (no CPE)range: < 8.6.0-150600.4.21.1
- (no CPE)range: < 7.66.0-150200.4.84.1
- (no CPE)range: < 7.66.0-150200.4.84.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 7.66.0-150200.4.84.1
- (no CPE)range: < 7.66.0-150200.4.84.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.6.0-150600.4.21.1
- (no CPE)range: < 8.0.1-11.105.1
- (no CPE)range: < 7.66.0-150200.4.84.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 8.0.1-150400.5.62.1
- (no CPE)range: < 7.66.0-150200.4.84.1
- (no CPE)range: < 8.0.1-11.105.1
- (no CPE)range: < 8.6.0-6.1
- (no CPE)range: < 8.0.1-150400.5.62.1
Patches
0No patches discovered yet.
Vulnerability mechanics
No source-code context for this CVE — mechanics is only generated when we can read the actual fix diff. Without that, the four sections (root cause, attack vector, affected code, fix) would be speculation rather than analysis.
References
3News mentions
0No linked articles in our index yet.