CVE-2022-22576
High · 8.1CVSS
8.1
EPSS
2.5%
Published
May 26, 2022
CISA due date
—
Cloudanix analysis
An older version of a widely used tool for secure network connections could let someone reuse a previous login to access email or directory information without providing the right credentials again.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Authentication Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows reuse of OAuth2-authenticated connections for SASL-enabled protocols (SMTP, IMAP, POP3, LDAP) without verifying that the original authentication credentials match those required for the current transfer, enabling credential bypass on connection reuse.
Why it matters to the business
Organizations relying on curl for secure email or directory operations face risk of unauthorized access to sensitive mailboxes or LDAP data, potentially leading to data exposure or compliance violations on legacy or unpatched systems.
How an attack unfolds
An attacker configures a client or application using vulnerable curl to establish an OAuth2-authenticated connection over an affected SASL protocol, then triggers connection reuse for a subsequent transfer with different credentials; the missing credential check permits the attacker to perform actions under the prior authentication context without re-authenticating.
How to fix it
Upgrade curl to a build containing commit 1669b17d3a1a1fd824308544ca0ec02a2a4f50ea or later; disable connection reuse for SASL OAuth2 flows where upgrade is not immediately feasible.
How to confirm the fix worked
Confirm the installed curl version is newer than 7.82.0 or contains commit 1669b17d3a1a1fd824308544ca0ec02a2a4f50ea; test OAuth2 SASL transfers with deliberately mismatched credentials to verify reuse is rejected.
Typical attack path
- Identify an application or script using curl 7.33.0-7.82.0 with SASL protocols and OAuth2
- Establish an initial OAuth2-authenticated connection via SMTP/IMAP/POP3/LDAP
- Force connection reuse for a new transfer specifying different credentials
- Perform authenticated actions (send/retrieve mail or directory queries) under the reused session without matching credentials
How to detect it
Review application logs and network traces for curl-based SASL OAuth2 sessions showing connection reuse across credential changes; inspect source or build metadata for curl versions 7.33.0 through 7.82.0.
What your security team should do
- Prioritize upgrade of all curl installations to the fixed commit or a release after 7.82.0
- Audit code and configurations using curl with SMTP, IMAP, POP3, or LDAP over SASL OAuth2
- Implement network segmentation and least-privilege OAuth2 scopes for affected protocols until patched
- Monitor for new curl releases and include the library in dependency scanning pipelines
The record
An improper authentication vulnerability exists in curl 7.33.0 to and including 7.82.0 which might allow reuse OAUTH2-authenticated connections without properly making sure that the connection was authenticated with the same credentials as set for this transfer. This affects SASL-enabled protocols: SMPTP(S), IMAP(S), POP3(S) and LDAP(S) (openldap only).
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+deb10u3 |
| 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 Micro 5.1 | curl | 0 | 7.66.0-150200.4.30.1 |
| SUSE:Linux Enterprise Micro 5.2 | curl | 0 | 7.66.0-150200.4.30.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | curl | 0 | 7.66.0-150200.4.30.1 |
| SUSE:Linux Enterprise Server 12 SP5 | curl | 0 | 7.60.0-11.37.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | curl | 0 | 7.60.0-11.37.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | curl | 0 | 7.60.0-11.37.1 |
| 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:Leap 15.3 | curl | 0 | 7.66.0-150200.4.30.1 |
| 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-27774 An insufficiently protected credentials vulnerability exists in curl 4.9 to and include… 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