Curl Credential Leak Vulnerability in Debian Packages

curl Updated 02 Oct 2025

Summary

05/02/2025
N/A
Yes i
Unrated
Not published

CVE-2025-0167: 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. Affects curl across 2 version ranges.

< 8.12.0-r0 >= 3266b35bbe21c68dea0dc7ccd991eb028e6d360c, < 34cf9d54a46598c44938aa7598820484d7af7133

Fixed in 8.12.0-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Curl is a widely used command-line tool and library for transferring data with URLs. It supports various protocols, including HTTP, HTTPS, FTP, and more. Curl is integral for developers and system administrators for tasks such as downloading files, testing APIs, and automating web interactions. However, it is susceptible to a vulnerability that can lead to credential leakage under specific conditions, particularly when using a .netrc file for authentication.

Vulnerability Detail

The vulnerability identified as CVE-2025-0167 occurs when curl is instructed to use a .netrc file for credentials while also following HTTP redirects. If the .netrc file contains a default entry that omits both the login and password, there is a risk that the password used for the initial host may be leaked to the redirected host. This flaw is particularly concerning as it can expose sensitive credentials to unintended parties, especially in environments where multiple redirects are common.

How To Fix

Minimum fixed version

8.12.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade curl

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using the .netrc file for authentication or disable HTTP redirects when using curl. This can be done by using the -L option cautiously or by specifying credentials directly in the command line, although this is not recommended for security reasons.

Conclusion

The CVE-2025-0167 vulnerability in curl poses a significant risk of credential leakage when using a .netrc file in conjunction with HTTP redirects. Users are advised to update their curl installations and review their .netrc configurations to mitigate this risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for curl →

Share this vulnerability

FAQ

CVE-2025-0167 is a vulnerability in curl that can lead to credential leakage when using a .netrc file and following HTTP redirects.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

If an immediate update is not possible, consider using workarounds such as avoiding the use of the .netrc file or disabling HTTP redirects.

This vulnerability is considered rare, as it only occurs under specific conditions involving the .netrc file configuration.

More information can be found in the official curl documentation and security advisories, as well as on vulnerability databases.

Related vulnerabilities

Recent vulnerabilities recorded for curl.

How To Fix

Minimum fixed version

8.12.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade curl

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback