CVE-2025-0167
NoneCVSS
—
EPSS
0.7%
Published
Feb 5, 2025
CISA due date
—
Cloudanix analysis
A data transfer tool could accidentally send saved login details to the wrong server when it follows a link and uses a special settings file with incomplete entries.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Credential Exposure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Curl leaks the password associated with a netrc default entry (lacking explicit login and password) to the destination host when processing an HTTP redirect after authenticating to the initial host.
Why it matters to the business
Organizations relying on curl for automated transfers risk unintended exposure of stored credentials to untrusted hosts, potentially enabling account compromise or further lateral movement in environments that use netrc defaults.
How an attack unfolds
An attacker hosts a page that issues an HTTP redirect to a controlled server, crafts a minimal netrc file containing only a default entry without credentials, and invokes curl with both --netrc and --location options against an initial target; curl then supplies the first host's password to the redirect target.
How to fix it
Upgrade curl to the version containing commit 34cf9d54a46598c44938aa7598820484d7af7133 or later; avoid netrc default entries that omit both login and password; consider disabling automatic redirect following when netrc is in use.
How to confirm the fix worked
Confirm the installed curl binary reports a version after the referenced commit; test with a controlled redirect and netrc default entry to verify credentials are no longer forwarded; review build or package manifests for the patched commit hash.
Typical attack path
- Place a minimal default entry (no login or password) in the user's netrc file
- Invoke curl with netrc and follow-redirects flags against an initial host
- Initial host returns an HTTP redirect to an attacker-controlled endpoint
- Curl forwards the original password in the Authorization header to the redirect target
How to detect it
Search web proxy, curl invocation, and command-line history logs for processes using both netrc and location flags together with subsequent requests to unexpected hosts; inspect netrc files for default entries lacking login and password fields.
What your security team should do
- Prioritize patching all curl installations to the fixed commit within standard change windows
- Audit scripts and automation for combined use of netrc and redirect following
- Replace netrc default entries with explicit per-host login/password pairs
- Monitor EPSS trend and reassess if exploit maturity increases
The record
When asked to use a `.netrc` file for credentials **and** to follow HTTP redirects, curl could leak the password used for the first host to the followed-to host under certain circumstances. This flaw only manifests itself if the netrc file has a `default` entry that omits both login and password. A rare circumstance.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.18 | curl | 0 | 8.12.0-r0 |
| Alpine:v3.19 | curl | 0 | 8.12.0-r0 |
| Alpine:v3.20 | curl | 0 | 8.12.0-r0 |
| Alpine:v3.21 | curl | 0 | 8.12.0-r0 |
| Alpine:v3.22 | curl | 0 | 8.12.0-r0 |
| Chainguard | curl | 0 | 8.12.0-r0 |
| Chainguard | curl-dev | 0 | 8.12.0-r0 |
| Chainguard | curl-doc | 0 | 8.12.0-r0 |
| Chainguard | curl-oci-entrypoint | 0 | 8.12.0-r0 |
| Chainguard | curl-static | 0 | 8.12.0-r0 |
| Chainguard | libcurl-openssl4 | 0 | 8.12.0-r0 |
| Chainguard | libcurl4 | 0 | 8.12.0-r0 |
| Debian:12 | curl | 0 | No fix |
| Debian:13 | curl | 0 | No fix |
| Debian:13 | curl | 0 | 8.12.0+git20250209.89ed161+ds-1 |
| Mageia:9 | curl | 0 | 7.88.1-4.6.mga9 |
| SUSE:Enterprise Storage 7.1 | curl | 0 | 7.66.0-150200.4.84.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | curl | 0 | 7.66.0-150200.4.84.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Installer Updates 15 SP4 | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Installer Updates 15 SP5 | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Micro 5.1 | curl | 0 | 7.66.0-150200.4.84.1 |
| SUSE:Linux Enterprise Micro 5.2 | curl | 0 | 7.66.0-150200.4.84.1 |
| SUSE:Linux Enterprise Micro 5.3 | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Micro 5.4 | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Micro 5.5 | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | curl | 0 | 8.6.0-150600.4.21.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | curl | 0 | 8.0.1-11.105.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | curl | 0 | 7.66.0-150200.4.84.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | curl | 0 | 8.0.1-150400.5.62.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | curl | 0 | 8.0.1-11.105.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | curl | 0 | 7.66.0-150200.4.84.1 |
| SUSE:Manager Server 4.3 | curl | 0 | 8.0.1-150400.5.62.1 |
| Wolfi | curl | 0 | 8.12.0-r0 |
| Wolfi | curl-dev | 0 | 8.12.0-r0 |
| Wolfi | curl-doc | 0 | 8.12.0-r0 |
| Wolfi | curl-oci-entrypoint | 0 | 8.12.0-r0 |
| Wolfi | curl-static | 0 | 8.12.0-r0 |
| Wolfi | libcurl-openssl4 | 0 | 8.12.0-r0 |
| Wolfi | libcurl4 | 0 | 8.12.0-r0 |
| openSUSE:Leap 15.6 | curl | 0 | 8.6.0-150600.4.21.1 |
Related vulnerabilities
- CVE-2025-0725 When libcurl is asked to perform automatic gzip decompression of content-encoded HTTP… Also affects curl
- CVE-2025-0665 libcurl would wrongly close the same eventfd file descriptor twice when taking down a… Also affects curl
- CVE-2024-11053 When asked to both use a `.netrc` file for credentials and to follow HTTP redirects, curl… Also affects curl
- CVE-2024-9681 When curl is asked to use HSTS, the expiry time for a subdomain might overwrite a parent… Also affects curl
- CVE-2024-8096 When curl is told to use the Certificate Status Request TLS extension, often referred to… Also affects curl
- CVE-2023-46219 When saving HSTS data to an excessively long file name, curl could end up removing all… Also affects curl
- CVE-2023-46218 This flaw allows a malicious HTTP server to set "super cookies" in curl that are then… Also affects curl
- CVE-2023-38545 This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. Also affects curl