Description
libcurl may read outside of a heap allocated buffer when doing FTP. When libcurl connects to an FTP server and successfully logs in (anonymous or not), it asks the server for the current directory with the `PWD` command. The server then responds with a 257 response containing the path, inside double quotes. The returned path name is then kept by libcurl for subsequent uses. Due to a flaw in the string parser for this directory name, a directory name passed like this but without a closing double quote would lead to libcurl not adding a trailing NUL byte to the buffer holding the name. When libcurl would then later access the string, it could read beyond the allocated heap buffer and crash or wrongly access data beyond the buffer, thinking it was part of the path. A malicious server could abuse this fact and effectively prevent libcurl-based clients to work with it - the PWD command is always issued on new FTP connections and the mistake has a high chance of causing a segfault. The simple fact that this has issue remained undiscovered for this long could suggest that malformed PWD responses are rare in benign servers. We are not aware of any exploit of this flaw. This bug was introduced in commit [415d2e7cb7](https://github.com/curl/curl/commit/415d2e7cb7), March 2005. In libcurl version 7.56.0, the parser always zero terminates the string but also rejects it if not terminated properly with a final double quote.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | curl | 7.56.1-1 | — |
| Debian 13 | curl | 7.56.1-1 | — |
| Debian 12 | curl | 7.56.1-1 | — |
| Debian 9 | curl | 7.52.1-5+deb9u1 | DSA-3992-1 |
| Debian 8 | curl | 7.38.0-4+deb8u6 | DSA-3992-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 7 | curl | 7.26.0-1+wheezy21 | DLA-1121-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | curl | 7.47.0-1ubuntu2.3 | USN-3441-1 |
| Ubuntu 14.04 LTS | curl | 7.35.0-1ubuntu2.11 | USN-3441-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 3 | httpd24-curl +2 | 7.61.1-1.el6 | RHSA-2018:3558 |
| RHEL 3 | httpd24-httpd +5 | 2.4.34-7.el6 | RHSA-2018:3558 |
| RHEL 3 | httpd24-mod_md | 2.4.34-7.el7 | RHSA-2018:3558 |
| RHEL 3 | httpd24-mod_ssl +1 | 1:2.4.34-7.el6 | RHSA-2018:3558 |
| RHEL 3 | httpd24-nghttp2 +2 | 1.7.1-7.el6 | RHSA-2018:3558 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP3 | curl | 7.37.0-37.8.1 | SUSE-SU-2017:2831-1 |
| SLES 12 SP2 | curl | 7.37.0-37.8.1 | SUSE-SU-2017:2831-1 |
| SLES 11 SP4 | curl | 7.19.7-1.70.8.1 | SUSE-SU-2017:3176-1 |
| SLES 11 | curl-openssl1 | 7.19.7-1.70.8.1 | SUSE-SU-2017:3176-1 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Studio Onsite 1.3 | curl | 7.19.7-1.20.53.6.1 | SUSE-SU-2018:0214-1, SUSE-SU-2017:2789-1 |
| SLES for SAP 12 SP3 | curl | 7.37.0-37.8.1 | SUSE-SU-2017:2831-1 |
| SLES for SAP 12 SP2 | curl | 7.37.0-37.8.1 | SUSE-SU-2017:2831-1 |
| SLES for SAP 11 SP4 | curl | 7.19.7-1.70.8.1 | SUSE-SU-2017:3176-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | curl | 7.79.1-1.1 | openSUSE-SU-2024:10582-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.6 | curl | 7.56.0-r0 | — |
| Alpine v3.5 | curl | 7.56.0-r0 | — |
| Alpine v3.4 | curl | 7.55.0-r1 | — |
| Alpine v3.3 | curl | 7.55.0-r1 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | curl +2 | 7.61.1-9.amzn2.0.1 | ALAS2-2019-1162 |
Advisories 14
- RHSA-2018:3558 Red Hat Security Advisory: httpd24 security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Sep 21, 2026
- USN-3441-1 curl vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DSA-3992-1 curl - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1121-1 curl - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10582-1 curl-7.79.1-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:2789-1 Security update for curl SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:3176-1 Security update for curl SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2017:2831-1 Security update for curl SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:0214-1 Security update for curl SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2026-0180 Dell Data Protection Advisor: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 20, 2026
- VDE-2019-009 PHOENIX CONTACT: Multiple Vulnerabilities in AXC F 2152 CERT@VDE · May 22, 2025
- WID-SEC-2023-1646 libcurl: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Jul 4, 2023
- ICSA-19-155-01 PHOENIX CONTACT PLCNext AXC F 2152 CISA ICS & IT advisories · Jun 4, 2019
- ALAS2-2019-1162 Moderate: curl security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Feb 18, 2019
References
- GLSA-201712-04 vendor-advisory
- RHSA-2018:3558 vendor-advisory
- https://support.apple.com/HT208331
- 1039509 vdb-entry
- https://curl.haxx.se/673d0cd8.patch
- https://curl.haxx.se/docs/adv_20171004.html
- RHSA-2018:2486 vendor-advisory
- DSA-3992 vendor-advisory
- 101115 vdb-entry
- [bookkeeper-issues] 20210628 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8 mailing-list
- [bookkeeper-issues] 20210629 [GitHub] [bookkeeper] padma81 opened a new issue #2746: Security Vulnerabilities in CentOS 7 image, Upgrade image to CentOS 8 mailing-list