CVE-2017-1000100
Medium · 6.5CVSS
6.5
EPSS
4.0%
Published
Oct 5, 2017
CISA due date
—
Cloudanix analysis
A problem in the curl tool could let a malicious website trick it into accidentally sending private information stored in memory to an attacker.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Incorrect buffer length calculation after filename truncation in TFTP handling causes sendto() to transmit data beyond the allocated heap buffer, resulting in disclosure of adjacent memory contents over UDP.
Why it matters to the business
Attackers can obtain sensitive data such as credentials or session tokens from client memory, creating compliance and data-breach risks; the issue affects any application or system using the vulnerable library for network transfers.
How an attack unfolds
An attacker hosts a malicious HTTP server that issues a redirect to a crafted TFTP URL containing an overly long filename; a client following the redirect without protocol restrictions triggers the flawed TFTP code path and leaks heap memory contents to the attacker-controlled UDP endpoint.
How to fix it
Upgrade libcurl to a version containing the fix for this truncation logic error and configure CURLOPT_REDIR_PROTOCOLS (or --proto-redir) to exclude the tftp protocol from allowed redirects.
How to confirm the fix worked
Verify the installed libcurl version is newer than the vulnerable release, run targeted tests that exercise TFTP redirects with long filenames, and confirm that protocol restrictions prevent the TFTP code path from executing.
Typical attack path
- Position a malicious HTTP server to serve a redirect response
- Craft a TFTP URL with a filename exceeding approximately 515 bytes
- Induce the vulnerable client to follow the redirect without protocol restrictions
- Receive and extract private memory contents delivered over UDP
How to detect it
Review HTTP access logs for redirects to tftp:// URLs, inspect outbound UDP traffic on port 69 for unusual volume or destinations immediately following web requests, and search process execution logs for curl invocations involving TFTP.
What your security team should do
- Prioritize upgrade of all libcurl instances to a patched release
- Apply protocol restriction settings in applications that perform redirects
- Audit code and configurations that allow unrestricted redirect protocols
- Monitor network logs for unexpected TFTP/UDP traffic originating from curl-using processes
The record
When doing a TFTP transfer and curl/libcurl is given a URL that contains a very long file name (longer than about 515 bytes), the file name is truncated to fit within the buffer boundaries, but the buffer size is still wrongly updated to use the untruncated length. This too large value is then used in the sendto() call, making curl attempt to send more data than what is actually put into the buffer. The endto() function will then read beyond the end of the heap based buffer. A malicious HTTP(S) server could redirect a vulnerable libcurl-using client to a crafted TFTP URL (if the client hasn't restricted which protocols it allows redirects to) and trick it to send private memory contents to a remote server over UDP. Limit curl's redirect protocols with --proto-redir and libcurl's with CURLOPT_REDIR_PROTOCOLS.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.11 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.12 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.13 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.14 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.15 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.16 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.17 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.18 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.19 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.20 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.21 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.22 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.3 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.4 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.5 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.6 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.7 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.8 | curl | 0 | 7.55.0-r0 |
| Alpine:v3.9 | curl | 0 | 7.55.0-r0 |
| Debian:11 | curl | 0 | 7.55.0-1 |
| Debian:12 | curl | 0 | 7.55.0-1 |
| Debian:13 | curl | 0 | 7.55.0-1 |
| Debian:7 | curl | 0 | 7.26.0-1+wheezy20 |
| Debian:8 | curl | 0 | 7.38.0-4+deb8u6 |
| Debian:9 | curl | 0 | 7.52.1-5+deb9u1 |
| Mageia:5 | curl | 0 | 7.40.0-3.14.mga5 |
| Mageia:6 | curl | 0 | 7.54.1-2.2.mga6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-curl | 0 | 0:7.61.1-1.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-curl-debuginfo | 0 | 0:7.61.1-1.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-httpd | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-httpd-debuginfo | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-httpd-devel | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-httpd-manual | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-httpd-tools | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-libcurl | 0 | 0:7.61.1-1.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-libcurl-devel | 0 | 0:7.61.1-1.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-libnghttp2 | 0 | 0:1.7.1-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-libnghttp2-devel | 0 | 0:1.7.1-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-mod_ldap | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-mod_proxy_html | 0 | 1:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-mod_session | 0 | 0:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-mod_ssl | 0 | 1:2.4.34-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-nghttp2 | 0 | 0:1.7.1-7.el6 |
| Red Hat:rhel_software_collections:3::el6 | httpd24-nghttp2-debuginfo | 0 | 0:1.7.1-7.el6 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-curl | 0 | 0:7.61.1-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-curl-debuginfo | 0 | 0:7.61.1-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-httpd | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-httpd-debuginfo | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-httpd-devel | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-httpd-manual | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-httpd-tools | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-libcurl | 0 | 0:7.61.1-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-libcurl-devel | 0 | 0:7.61.1-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-libnghttp2 | 0 | 0:1.7.1-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-libnghttp2-devel | 0 | 0:1.7.1-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-mod_ldap | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-mod_md | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-mod_proxy_html | 0 | 1:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-mod_session | 0 | 0:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-mod_ssl | 0 | 1:2.4.34-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-nghttp2 | 0 | 0:1.7.1-7.el7 |
| Red Hat:rhel_software_collections:3::el7 | httpd24-nghttp2-debuginfo | 0 | 0:1.7.1-7.el7 |
| SUSE:Linux Enterprise Desktop 12 SP2 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Server 11 SP4 | curl | 0 | 7.19.7-1.70.3.1 |
| SUSE:Linux Enterprise Server 11-SECURITY | curl-openssl1 | 0 | 7.19.7-1.70.3.1 |
| SUSE:Linux Enterprise Server 12 SP2 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Server 12 SP3 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | curl | 0 | 7.19.7-1.70.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | curl | 0 | 7.19.7-1.70.3.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | curl | 0 | 7.37.0-37.3.1 |
| SUSE:Studio Onsite 1.3 | curl | 0 | 7.19.7-1.20.53.3.1 |
| Ubuntu:14.04:LTS | curl | 0 | 7.35.0-1ubuntu2.11 |
| Ubuntu:16.04:LTS | curl | 0 | 7.47.0-1ubuntu2.3 |
| openSUSE:Tumbleweed | curl | 0 | 7.79.1-1.1 |
Related vulnerabilities
- 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-8285 curl 7.21.0 to and including 7.73.0 is vulnerable to uncontrolled recursion due to a… Also affects curl
- CVE-2020-8169 curl 7.62.0 through 7.70.0 is vulnerable to an information disclosure vulnerability that… Also affects curl
- CVE-2020-8231 Due to use of a dangling pointer, libcurl 7.29.0 through 7.71.1 can use the wrong… Also affects curl
- CVE-2020-8177 curl 7.20.0 through 7.70.0 is vulnerable to improper restriction of names for files and… 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
- CVE-2019-5482 Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3. Also affects curl
- CVE-2019-5436 A heap buffer overflow in the TFTP receiving code allows for DoS or arbitrary code… Also affects curl