CVE-2022-42916
High · 7.5CVSS
7.5
EPSS
2.0%
Published
Oct 29, 2022
CISA due date
—
Cloudanix analysis
A widely used command-line tool for moving data could be tricked into using an insecure connection instead of a secure one when certain international web addresses are involved.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The HSTS enforcement logic in curl fails to normalize IDN hostnames before comparison, allowing a Unicode full stop (U+3002) to bypass the stored HTTPS policy and downgrade a request to cleartext HTTP.
Why it matters to the business
Organizations relying on curl for secure transfers face increased risk of credential or data exposure over unencrypted channels when connecting to domains that use internationalized names, especially in automated scripts and CI/CD pipelines that still run older builds.
How an attack unfolds
An attacker registers or controls a domain whose IDN form contains a visually similar full-width stop, tricks a curl client into requesting that host via HTTP, and the HSTS check is evaded because the converted ASCII form does not match the previously stored HTTPS entry, resulting in an unencrypted connection.
How to fix it
Upgrade curl to version 7.86.0 or later, or apply commit cd95ee9f771361acf241629d2fe5507e308082a2. Rebuild any statically linked binaries and verify the new version reports itself as 7.86.0 or newer.
How to confirm the fix worked
Run 'curl --version' and confirm the reported version is 7.86.0 or later; test HSTS behavior with a crafted IDN URL containing U+3002 to ensure HTTPS is enforced.
Typical attack path
- Attacker crafts a URL containing an IDN hostname with U+3002 instead of '.'
- Victim client using curl < 7.86.0 resolves the name and performs an HSTS lookup on the unconverted form
- No matching HTTPS entry is found, so curl proceeds with plain HTTP
- Attacker intercepts or observes the cleartext traffic to capture sensitive data
How to detect it
Search proxy, web server, and endpoint logs for HTTP requests to hosts whose names contain or resolve from IDN full-width stops; review curl command lines or library calls that lack explicit --proto-redir or --hsts options.
What your security team should do
- Immediately inventory all systems and containers using curl < 7.86.0
- Prioritize patching of internet-facing automation, proxies, and download scripts
- Add curl version checks to build pipelines and dependency scanners
- Monitor EPSS trend and re-evaluate if exploit code appears
The record
In curl before 7.86.0, the HSTS check could be bypassed to trick it into staying with HTTP. Using its HSTS support, curl can be instructed to use HTTPS directly (instead of using an insecure cleartext HTTP step) even when HTTP is provided in the URL. This mechanism could be bypassed if the host name in the given URL uses IDN characters that get replaced with ASCII counterparts as part of the IDN conversion, e.g., using the character UTF-8 U+3002 (IDEOGRAPHIC FULL STOP) instead of the common ASCII full stop of U+002E (.). The earliest affected version is 7.77.0 2021-05-26.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.15 | curl | 0 | 7.80.0-r4 |
| Alpine:v3.16 | curl | 0 | 7.83.1-r4 |
| Alpine:v3.17 | curl | 0 | 7.86.0-r0 |
| Alpine:v3.18 | curl | 0 | 7.86.0-r0 |
| Alpine:v3.19 | curl | 0 | 7.86.0-r0 |
| Alpine:v3.20 | curl | 0 | 7.86.0-r0 |
| Alpine:v3.21 | curl | 0 | 7.86.0-r0 |
| Alpine:v3.22 | curl | 0 | 7.86.0-r0 |
| Chainguard | curl | 0 | 7.86.0-r0 |
| Chainguard | curl-dev | 0 | 7.86.0-r0 |
| Chainguard | curl-doc | 0 | 7.86.0-r0 |
| Chainguard | curl-oci-entrypoint | 0 | 7.86.0-r0 |
| Chainguard | curl-static | 0 | 7.86.0-r0 |
| Chainguard | libcurl-openssl4 | 0 | 7.86.0-r0 |
| Chainguard | libcurl4 | 0 | 7.86.0-r0 |
| Debian:11 | curl | 0 | No fix |
| Debian:12 | curl | 0 | 7.86.0-1 |
| Debian:13 | curl | 0 | 7.86.0-1 |
| 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:Linux Enterprise Micro 5.3 | curl | 0 | 7.79.1-150400.5.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | curl | 0 | 7.79.1-150400.5.9.1 |
| Ubuntu:18.04:LTS | curl | 0 | 7.58.0-2ubuntu3.21 |
| Ubuntu:20.04:LTS | curl | 0 | 7.68.0-1ubuntu2.14 |
| Ubuntu:22.04:LTS | curl | 0 | 7.81.0-1ubuntu1.6 |
| Wolfi | curl | 0 | 7.86.0-r0 |
| Wolfi | curl-dev | 0 | 7.86.0-r0 |
| Wolfi | curl-doc | 0 | 7.86.0-r0 |
| Wolfi | curl-oci-entrypoint | 0 | 7.86.0-r0 |
| Wolfi | curl-static | 0 | 7.86.0-r0 |
| Wolfi | libcurl-openssl4 | 0 | 7.86.0-r0 |
| Wolfi | libcurl4 | 0 | 7.86.0-r0 |
| openSUSE:Leap 15.4 | curl | 0 | 7.79.1-150400.5.9.1 |
| openSUSE:Tumbleweed | curl | 0 | 7.86.0-1.1 |
Related vulnerabilities
- CVE-2023-46219 When saving HSTS data to an excessively long file name, curl could end up removing all… Also affects curl
- CVE-2023-46218 This flaw allows a malicious HTTP server to set "super cookies" in curl that are then… Also affects curl
- CVE-2023-38545 This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. 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-2023-27533 A vulnerability in input validation exists in curl <8.0 during communication using the… Also affects curl
- CVE-2023-23915 A cleartext transmission of sensitive information vulnerability exists in curl <v7.88.0… Also affects curl
- CVE-2022-43551 A vulnerability exists in curl <7.87.0 HSTS check that could be bypassed to trick it to… Also affects curl