CVE-2022-27774
Medium · 5.7CVSS
5.7
EPSS
2.0%
Published
Jun 2, 2022
CISA due date
—
Cloudanix analysis
Some applications that automatically follow web links while logged in could accidentally send usernames and passwords to the wrong servers.
- 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
The flaw allows credentials supplied for HTTP(S) authentication to be sent in cleartext or reused when a redirect targets a different protocol or port number, bypassing intended isolation.
Why it matters to the business
Stolen credentials can lead to account takeover or lateral movement across services; the issue affects widely reused components with 331 downstream dependents, amplifying exposure across many environments.
How an attack unfolds
An attacker hosts a service on an alternate port or protocol and returns an HTTP redirect from an authenticated request; the vulnerable client follows the redirect and transmits the original credentials, which the attacker captures. Public exploit code exists and the flaw has been known for over four years.
How to fix it
Upgrade affected components to the versions that contain the fix; for pillow (Bitnami) this means version 9.0.0 or later. Disable automatic following of redirects when authentication is in use until patches can be applied.
How to confirm the fix worked
Confirm installed package versions match or exceed the fixed releases, then run integration tests that exercise authenticated redirects to alternate ports and verify credentials are no longer transmitted.
Typical attack path
- Attacker configures a redirect target on a non-standard port or protocol
- Victim client initiates authenticated request to initial host
- Server responds with 3xx redirect to attacker-controlled endpoint
- Client re-uses credentials when following the redirect
- Attacker logs the leaked authentication material
How to detect it
Examine web or application logs for authenticated requests that result in redirects to non-standard ports or protocols; correlate with subsequent authentication attempts from the same session to different endpoints.
What your security team should do
- Prioritize upgrade of all instances to the fixed versions within the next change window
- Review and restrict redirect-following behavior in applications that use authentication
- Add monitoring for authentication attempts to unexpected ports or protocols
- Re-issue credentials that may have been exposed through prior redirects
The record
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 authentication could leak credentials to other services that exist on different protocols or port numbers.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | curl | 0 | 7.61.1-22.el8_6.3 |
| AlmaLinux:8 | libcurl | 0 | 7.61.1-22.el8_6.3 |
| AlmaLinux:8 | libcurl-devel | 0 | 7.61.1-22.el8_6.3 |
| AlmaLinux:8 | libcurl-minimal | 0 | 7.61.1-22.el8_6.3 |
| Alpine:v3.12 | curl | 0 | 7.79.1-r1 |
| Alpine:v3.13 | curl | 0 | 7.79.1-r1 |
| Alpine:v3.14 | curl | 0 | 7.79.1-r1 |
| Alpine:v3.15 | curl | 0 | 7.80.0-r1 |
| Alpine:v3.16 | curl | 0 | 7.83.0-r0 |
| Alpine:v3.17 | curl | 0 | 7.83.0-r0 |
| Alpine:v3.18 | curl | 0 | 7.83.0-r0 |
| Alpine:v3.19 | curl | 0 | 7.83.0-r0 |
| Alpine:v3.20 | curl | 0 | 7.83.0-r0 |
| Alpine:v3.21 | curl | 0 | 7.83.0-r0 |
| Alpine:v3.22 | curl | 0 | 7.83.0-r0 |
| Debian:10 | curl | 0 | 7.64.0-4+deb10u4 |
| Debian:11 | curl | 0 | 7.74.0-1.3+deb11u2 |
| Debian:12 | curl | 0 | 7.83.0-1 |
| Debian:13 | curl | 0 | 7.83.0-1 |
| Mageia:8 | curl | 0 | 7.74.0-1.5.mga8 |
| Red Hat:enterprise_linux:8::baseos | curl | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | curl-debuginfo | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | curl-debugsource | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | curl-minimal-debuginfo | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | libcurl | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | libcurl-debuginfo | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | libcurl-devel | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | libcurl-minimal | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:8::baseos | libcurl-minimal-debuginfo | 0 | 0:7.61.1-22.el8_6.3 |
| Red Hat:enterprise_linux:9::appstream | curl | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | curl-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | curl-debugsource | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | curl-minimal | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | curl-minimal-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | libcurl | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | libcurl-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | libcurl-devel | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | libcurl-minimal | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::appstream | libcurl-minimal-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | curl | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | curl-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | curl-debugsource | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | curl-minimal | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | curl-minimal-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | libcurl | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | libcurl-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | libcurl-devel | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | libcurl-minimal | 0 | 0:7.76.1-14.el9_0.4 |
| Red Hat:enterprise_linux:9::baseos | libcurl-minimal-debuginfo | 0 | 0:7.76.1-14.el9_0.4 |
| Rocky Linux:8 | curl | 0 | 0:7.61.1-22.el8_6.3 |
| SUSE:Linux Enterprise Server 12 SP5 | curl | 0 | 8.0.1-11.65.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | curl | 0 | 8.0.1-11.65.2 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | curl | 0 | 8.0.1-11.65.2 |
| Ubuntu:18.04:LTS | curl | 0 | 7.58.0-2ubuntu3.17 |
| Ubuntu:20.04:LTS | curl | 0 | 7.68.0-1ubuntu2.10 |
| Ubuntu:22.04:LTS | curl | 0 | 7.81.0-1ubuntu1.1 |
| Ubuntu:Pro:14.04:LTS | curl | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | curl | 0 | No fix |
| openSUSE:Tumbleweed | curl | 0 | 7.83.0-1.1 |
Related vulnerabilities
- CVE-2023-46218 This flaw allows a malicious HTTP server to set "super cookies" in curl that are then… Also affects curl
- CVE-2023-38546 This flaw allows an attacker to insert cookies at will into a running program using… Also affects curl
- CVE-2023-28322 An information disclosure vulnerability exists in curl <v8.1.0 when doing HTTP(S)… Also affects curl
- CVE-2022-27782 libcurl would reuse a previously created connection even when a TLS or SSHrelated option… Also affects curl
- CVE-2022-22576 An improper authentication vulnerability exists in curl 7.33.0 to and including 7.82.0… Also affects curl
- CVE-2021-22898 curl 7.7 through 7.76.1 suffers from an information disclosure when the `-t` command line… Also affects curl
- CVE-2022-27775 An information disclosure vulnerability exists in curl 7.65.0 to 7.82.0 are vulnerable… Also affects curl
- CVE-2021-22946 A user can tell curl >= 7.20.0 and <= 7.78.0 to require a successful upgrade to TLS when… Also affects curl