Insufficiently Protected Credentials in curl - CVE-2022-27774

curl Updated 02 Oct 2025

Summary

02/06/2022
N/A
Yes i
Medium
5.7

ALPINE-CVE-2022-27774: An insufficiently protected credentials vulnerability exists in curl 4.9 to and include curl 7.82.0 are affected that could allow an attacker to extract credentials when follows HTTP(S) redirects is used with authenticat... Affects curl versions < 7.79.1-r1. Fixed in 7.79.1-r1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 known for its versatility and is often utilized in scripts and applications for data transfer. However, it is vulnerable to an issue where credentials may be leaked when following HTTP(S) redirects with authentication, posing a risk to user data and security.

Vulnerability Detail

The vulnerability identified as CVE-2022-27774 affects curl versions from 4.9 up to 7.82.0. It arises from insufficient protection of credentials during HTTP(S) redirects, which can allow attackers to extract sensitive information. If an authenticated request is redirected to a different service that uses a different protocol or port, credentials may inadvertently be exposed, leading to potential unauthorized access and data breaches.

How To Fix

Minimum fixed version

7.79.1-r1

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 measure, avoid using curl with authentication when following redirects. This can be done by modifying your curl command to disable redirects using the -L option or by ensuring that sensitive operations do not involve redirects.

Conclusion

CVE-2022-27774 presents a significant risk to users of curl, particularly in scenarios involving authentication and redirects. It is crucial to update to the latest patched versions to mitigate this vulnerability and protect sensitive credentials from potential exposure.

See every vulnerability recorded for curl →

Share this vulnerability

FAQ

CVE-2022-27774 is a vulnerability in curl that allows credentials to be leaked when following HTTP(S) redirects with authentication.

curl versions from 4.9 to 7.82.0 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of CVE-2022-27774 is 5.7, indicating a moderate severity level.

If an immediate update is not possible, avoid using curl with authentication when following redirects as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for curl.

How To Fix

Minimum fixed version

7.79.1-r1

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