CVE-2017-1000254 json
libcurl may read outside of a heap allocated buffer when doing FTP.
published 2017-10-06 9 y ago modified 2026-06-17 4 mo ago also EUVD-2017-1515
- cvss
- 7.5
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 8.1%
- EPSS 8.1% chance of exploitation in 30 days, percentile 94%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- curl Debian 14, Debian 13, Debian 12 7.56.1-1
debian advisories DEBIAN-CVE-2017-1000254
- curl Ubuntu 14.04 LTS 7.35.0-1ubuntu2.11
- curl Ubuntu 16.04 LTS 7.47.0-1ubuntu2.3
ubuntu advisories UBUNTU-CVE-2017-1000254
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- httpd24-curl RHEL 3 SOFTWARE_COLLECTIONS 7.61.1-1.el6
- httpd24-curl RHEL 3 SOFTWARE_COLLECTIONS 7.61.1-1.el7
- httpd24-httpd RHEL 3 SOFTWARE_COLLECTIONS 2.4.34-7.el6
- httpd24-httpd RHEL 3 SOFTWARE_COLLECTIONS 2.4.34-7.el7
- httpd24-mod_md RHEL 3 SOFTWARE_COLLECTIONS 2.4.34-7.el7
- httpd24-libcurl RHEL 3 SOFTWARE_COLLECTIONS 7.61.1-1.el6
- httpd24-libcurl RHEL 3 SOFTWARE_COLLECTIONS 7.61.1-1.el7
- httpd24-mod_ssl RHEL 3 SOFTWARE_COLLECTIONS 1:2.4.34-7.el6
red hat advisories RHSA-2018:3558
- curl Studio Onsite 1.3 7.19.7-1.20.53.13.1
- curl SLES for SAP 11 SP4, SLES 11 SP4, SLE Software Development Kit 11 SP4 7.19.7-1.70.8.1
- curl-openssl1 SLES 11-SECURITY 7.19.7-1.70.8.1
- curl SLES for SAP 12 SP3, SLES for SAP 12 SP2, SLES for Raspberry Pi 12 SP2 +6 more 7.37.0-37.8.1
- curl Studio Onsite 1.3 7.19.7-1.20.53.6.1
suse advisories SUSE-SU-2018:0214-1SUSE-SU-2017:3176-1SUSE-SU-2017:2831-1SUSE-SU-2017:2789-1
- curl openSUSE Tumbleweed 7.79.1-1.1
opensuse advisories openSUSE-SU-2024:10582-1
- curl Alpine 3.4, Alpine 3.3 7.55.0-r1
- curl Alpine 3.6, Alpine 3.5 7.56.0-r0
alpine advisories ALPINE-CVE-2017-1000254
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- curl.haxx.se/673d0cd8.patch patch
- curl.haxx.se/docs/adv_20171004.html advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-1000254 updated cvss 3.7
curl: FTP PWD response parser out of bounds read
-
Red Hat .NET Core 1.0 on Red Hat Enterprise Linux rh-dotnetcore10-curl Red Hat .NET Core 1.1 on Red Hat Enterprise Linux rh-dotnetcore11-curl Red Hat .NET Core 2.0 on Red Hat Enterprise Linux rh-dotnet20-curlaffected: no fix planned “Out of support scope”
-
Red Hat .NET Core 2.1 on Red Hat Enterprise Linux rh-dotnet21-curl, rh-dotnet21-libcurl Red Hat Enterprise Linux 5 curl Red Hat Enterprise Linux 6 curl, libcurl Red Hat Enterprise Linux 7 curl, libcurl Red Hat Enterprise Virtualization 3 mingw-virt-viewer, mingw32-virt-viewer, mingw64-virt-vieweraffected: no fix planned “Will not fix”
-
Red Hat JBoss Core Servicesfixed: vendor fix RHSA-2018:2486
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) httpd24-curl 7.61.1-1.el6, httpd24-httpd 2.4.34-7.el6, httpd24-nghttp2 1.7.1-7.el6, httpd24-libcurl 7.61.1-1.el6, httpd24-mod_ssl 2.4.34-7.el6, httpd24-mod_ldap 2.4.34-7.el6, +5 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) httpd24-curl 7.61.1-1.el7, httpd24-httpd 2.4.34-7.el7, httpd24-mod_md 2.4.34-7.el7, httpd24-nghttp2 1.7.1-7.el7, httpd24-libcurl 7.61.1-1.el7, httpd24-mod_ssl 2.4.34-7.el7, +6 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) httpd24-curl 7.61.1-1.el7, httpd24-httpd 2.4.34-7.el7, httpd24-mod_md 2.4.34-7.el7, httpd24-nghttp2 1.7.1-7.el7, httpd24-libcurl 7.61.1-1.el7, httpd24-mod_ssl 2.4.34-7.el7, +6 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) httpd24-curl 7.61.1-1.el7, httpd24-httpd 2.4.34-7.el7, httpd24-mod_md 2.4.34-7.el7, httpd24-nghttp2 1.7.1-7.el7, httpd24-libcurl 7.61.1-1.el7, httpd24-mod_ssl 2.4.34-7.el7, +6 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) httpd24-curl 7.61.1-1.el7, httpd24-httpd 2.4.34-7.el7, httpd24-mod_md 2.4.34-7.el7, httpd24-nghttp2 1.7.1-7.el7, httpd24-libcurl 7.61.1-1.el7, httpd24-mod_ssl 2.4.34-7.el7, +6 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) httpd24-curl 7.61.1-1.el6, httpd24-httpd 2.4.34-7.el6, httpd24-nghttp2 1.7.1-7.el6, httpd24-libcurl 7.61.1-1.el6, httpd24-mod_ssl 2.4.34-7.el6, httpd24-mod_ldap 2.4.34-7.el6, +5 morefixed: vendor fix RHSA-2018:3558
+1 more productsfewer
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) httpd24-curl 7.61.1-1.el7, httpd24-httpd 2.4.34-7.el7, httpd24-mod_md 2.4.34-7.el7, httpd24-nghttp2 1.7.1-7.el7, httpd24-libcurl 7.61.1-1.el7, httpd24-mod_ssl 2.4.34-7.el7, +6 more -
Red Hat JBoss Web Server 3 curlnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-19-155-01 updated cvss 7.5
PHOENIX CONTACT PLCNext AXC F 2152
-
Phoenix Contact AXC F 2152 2404267 version 1.x, 1046568 (Starterkit) version 1.xaffected: vendor fix, mitigation “Phoenix Contact recommends affected users update to firmware release 2019.0 LTS or later, update to PLCNext Engineer release 2019.0 LTS or later, and apply the following specific mitigations below:” phoenixcontact.com
From CISA ICS and IT advisories (CSAF, https://github.com/cisagov/CSAF), a U.S. Government work; changed: reduced to products, statuses and remediations. CISA notification · csaf
Exploit prediction
8.14% chance of exploitation in the next 30 days, higher than 94% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
- Weakness
-
- CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
References
-
curl.haxx.se
/673d0cd8.patch
patch, vendor-advisory
-
curl.haxx.se
/docs/adv_20171004.html
patch, vendor-advisory
-
security.gentoo.org
/glsa/201712-04
vendor-advisory
-
access.redhat.com
/errata/RHSA-2018:3558
vendor-advisory
-
access.redhat.com
/errata/RHSA-2018:2486
vendor-advisory
-
debian.org
/security/2017/dsa-3992
vendor-advisory
- support.apple.com /HT208331
-
securitytracker.com
/id/1039509
vdb-entry, third-party-advisory
-
securityfocus.com
/bid/101115
vdb-entry, third-party-advisory
-
lists.apache.org
/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E
mailing-list
-
lists.apache.org
/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E
mailing-list
Sources
- CVE List CVE-2017-1000254
- NVD CVE-2017-1000254
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.