CVE-2022-27781
High · 7.5CVSS
7.5
EPSS
2.9%
Published
Jun 2, 2022
CISA due date
—
Cloudanix analysis
A programming mistake in the curl library can make programs that fetch web content freeze and stop responding when they talk to certain malicious websites.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A malicious TLS server can trigger an infinite busy-loop inside libcurl's NSS certificate-info handling when CURLOPT_CERTINFO is enabled, causing the client to spin at 100 % CPU without making progress.
Why it matters to the business
Applications that use libcurl with NSS and request certificate details can become unresponsive or consume excessive CPU when they connect to an attacker-controlled server, leading to service degradation or outages.
How an attack unfolds
An attacker hosts a TLS server that returns a certificate chain crafted to exercise the faulty NSS code path. A client application built against the vulnerable libcurl, with CURLOPT_CERTINFO enabled, connects to the server; the library enters the busy-loop and never returns, denying service to the calling application.
How to fix it
Upgrade libcurl to a build that contains commit 462196e6b4a47f924293a0e26b8e9c23d37ac26f or later; rebuild any statically linked applications against the patched library.
How to confirm the fix worked
Confirm the running libcurl binary or library reports a version containing commit 462196e6b4a47f924293a0e26b8e9c23d37ac26f; test that connections to servers returning certificate chains complete without spinning.
Typical attack path
- Attacker deploys a malicious TLS endpoint that supplies a specially formed certificate chain.
- Victim application using vulnerable libcurl connects to the endpoint with CURLOPT_CERTINFO enabled.
- libcurl's NSS certificate-info routine enters an infinite loop.
- Client thread or process is permanently busy, preventing further useful work or causing resource exhaustion.
How to detect it
Look for libcurl worker processes consuming sustained 100 % CPU while performing TLS handshakes; correlate with outbound connections to previously unseen hosts around the time of the spike.
What your security team should do
- Immediately upgrade all curl/libcurl packages to a build containing commit 462196e6b4a47f924293a0e26b8e9c23d37ac26f.
- Audit internal code for use of CURLOPT_CERTINFO and disable the option where it is not required.
- Add the fixed commit identifier to vulnerability scanners and dependency manifests to prevent re-introduction.
- Monitor for high-CPU libcurl worker processes as a temporary compensating control until patching is complete.
The record
libcurl provides the `CURLOPT_CERTINFO` option to allow applications torequest details to be returned about a server's certificate chain.Due to an erroneous function, a malicious server could make libcurl built withNSS get stuck in a never-ending busy-loop when trying to retrieve thatinformation.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.13 | curl | 0 | 7.79.1-r2 |
| Alpine:v3.14 | curl | 0 | 7.79.1-r2 |
| Alpine:v3.15 | curl | 0 | 7.80.0-r2 |
| Alpine:v3.16 | curl | 0 | 7.83.1-r0 |
| Alpine:v3.17 | curl | 0 | 7.83.1-r0 |
| Alpine:v3.18 | curl | 0 | 7.83.1-r0 |
| Alpine:v3.19 | curl | 0 | 7.83.1-r0 |
| Alpine:v3.20 | curl | 0 | 7.83.1-r0 |
| Alpine:v3.21 | curl | 0 | 7.83.1-r0 |
| Alpine:v3.22 | curl | 0 | 7.83.1-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.1-1 |
| Debian:13 | curl | 0 | 7.83.1-1 |
| Mageia:8 | curl | 0 | 7.74.0-1.6.mga8 |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-curl | 0 | 0:7.86.0-2.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-curl-debuginfo | 0 | 0:7.86.0-2.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-httpd | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-httpd-debuginfo | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-httpd-devel | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-httpd-manual | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-httpd-selinux | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-httpd-tools | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-libcurl | 0 | 0:7.86.0-2.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-libcurl-devel | 0 | 0:7.86.0-2.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-mod_http2 | 0 | 0:1.15.19-20.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-mod_http2-debuginfo | 0 | 0:1.15.19-20.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-mod_ldap | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-mod_proxy_html | 0 | 1:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-mod_session | 0 | 0:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-mod_ssl | 0 | 1:2.4.51-37.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-openssl | 0 | 1:1.1.1k-13.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-openssl-debuginfo | 0 | 1:1.1.1k-13.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-openssl-devel | 0 | 1:1.1.1k-13.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-openssl-libs | 0 | 1:1.1.1k-13.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-openssl-perl | 0 | 1:1.1.1k-13.el7jbcs |
| Red Hat:jboss_core_services:1::el7 | jbcs-httpd24-openssl-static | 0 | 1:1.1.1k-13.el7jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-curl | 0 | 0:7.86.0-2.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-curl-debuginfo | 0 | 0:7.86.0-2.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd-debuginfo | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd-devel | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd-manual | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd-selinux | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd-tools | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-httpd-tools-debuginfo | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-libcurl | 0 | 0:7.86.0-2.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-libcurl-debuginfo | 0 | 0:7.86.0-2.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-libcurl-devel | 0 | 0:7.86.0-2.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_http2 | 0 | 0:1.15.19-20.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_http2-debuginfo | 0 | 0:1.15.19-20.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_ldap | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_ldap-debuginfo | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_proxy_html | 0 | 1:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_proxy_html-debuginfo | 0 | 1:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_session | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_session-debuginfo | 0 | 0:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_ssl | 0 | 1:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-mod_ssl-debuginfo | 0 | 1:2.4.51-37.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl | 0 | 1:1.1.1k-13.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl-debuginfo | 0 | 1:1.1.1k-13.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl-devel | 0 | 1:1.1.1k-13.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl-libs | 0 | 1:1.1.1k-13.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl-libs-debuginfo | 0 | 1:1.1.1k-13.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl-perl | 0 | 1:1.1.1k-13.el8jbcs |
| Red Hat:jboss_core_services:1::el8 | jbcs-httpd24-openssl-static | 0 | 1:1.1.1k-13.el8jbcs |
| SUSE:Enterprise Storage 6 | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Enterprise Storage 7 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:HPE Helion OpenStack 8 | curl | 0 | 7.37.0-37.76.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise Micro 5.1 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise Micro 5.2 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | curl | 0 | 7.37.0-37.76.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | curl | 0 | 7.37.0-37.76.1 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | curl | 0 | 7.37.0-37.76.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | curl | 0 | 7.60.0-4.38.1 |
| SUSE:Linux Enterprise Server 12 SP5 | curl | 0 | 7.60.0-11.40.2 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise Server 15-LTSS | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | curl | 0 | 7.37.0-37.76.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | curl | 0 | 7.60.0-4.38.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | curl | 0 | 7.60.0-11.40.2 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | curl | 0 | 7.60.0-150000.33.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | curl | 0 | 7.60.0-11.40.2 |
| SUSE:Manager Proxy 4.1 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Manager Retail Branch Server 4.1 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:Manager Server 4.1 | curl | 0 | 7.66.0-150200.4.33.1 |
| SUSE:OpenStack Cloud 8 | curl | 0 | 7.37.0-37.76.1 |
| SUSE:OpenStack Cloud 9 | curl | 0 | 7.60.0-4.38.1 |
| SUSE:OpenStack Cloud Crowbar 8 | curl | 0 | 7.37.0-37.76.1 |
| SUSE:OpenStack Cloud Crowbar 9 | curl | 0 | 7.60.0-4.38.1 |
| Ubuntu:18.04:LTS | curl | 0 | 7.58.0-2ubuntu3.18 |
| Ubuntu:20.04:LTS | curl | 0 | 7.68.0-1ubuntu2.11 |
| Ubuntu:22.04:LTS | curl | 0 | 7.81.0-1ubuntu1.2 |
| Ubuntu:Pro:14.04:LTS | curl | 0 | 7.35.0-1ubuntu2.20+esm11 |
| Ubuntu:Pro:16.04:LTS | curl | 0 | 7.47.0-1ubuntu2.19+esm4 |
| openSUSE:Leap 15.3 | curl | 0 | 7.66.0-150200.4.33.1 |
| openSUSE:Tumbleweed | curl | 0 | 7.83.1-1.1 |
Related vulnerabilities
- 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-2022-27775 An information disclosure vulnerability exists in curl 7.65.0 to 7.82.0 are vulnerable… 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-22946 A user can tell curl >= 7.20.0 and <= 7.78.0 to require a successful upgrade to TLS when… 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-2020-8284 A malicious server can use the FTP PASV response to trick curl 7.73.0 and earlier into… Also affects curl
- CVE-2019-5481 Double-free vulnerability in the FTP-kerberos code in cURL 7.52.0 to 7.65.3. Also affects curl