CVE-2018-14618: Buffer Overflow

Published Aug 27, 2018
·
Updated

curl before version 7.61.1 is vulnerable to a buffer overrun in the NTLM authentication code. The internal function Curlntlmcoremknthash multiplies the length of the password by two (SUM) to figure out how large temporary storage area to allocate from the heap. The length value is then subsequently used to iterate over the password and generate output into the allocated storage buffer. On systems with a 32 bit sizet, the math to calculate SUM triggers an integer overflow when the password length exceeds 2GB (2^31 bytes). This integer overflow usually causes a very small buffer to actually get allocated instead of the intended very huge one, making the use of that buffer end up in a heap buffer overflow. (This bug is almost identical to CVE-2017-8816.)

Other sources

NTLM password overflow via integer overflow ===========================================

Project curl Security Advisory, September 5th 2018 - Permalink

VULNERABILITY -------------

libcurl contains a buffer overflow in the NTLM authentication code.

The internal function Curlntlmcoremknthash multiplies the length of the password by two (SUM) to figure out how large temporary storage area to allocate from the heap.

The length value is then subsequently used to iterate over the password and generate output into the allocated storage buffer. On systems with a 32 bit sizet, the math to calculate SUM triggers an integer overflow when the password length exceeds 2GB (2^31 bytes). This integer overflow usually causes a very small buffer to actually get allocated instead of the intended very huge one, making the use of that buffer end up in a heap buffer overflow.

(This bug is almost identical to CVE-2017-8816.)

We are not aware of any exploit of this flaw.

INFO ----

This bug was introduced in commit be285cde3f, April 2006.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2018-XXXX to this issue.

CWE-131: Incorrect Calculation of Buffer Size

AFFECTED VERSIONS -----------------

This is only an issue on 32 bit systems. It also requires the password field to use more than 2GB of memory, which in itself should be rare.

- Affected versions: libcurl 7.15.4 to and including 7.61.0 - Not affected versions: libcurl < 7.15.4 and >= 7.61.1

curl is used by many applications, but not always advertised as such.

THE SOLUTION ------------

In libcurl version 7.61.1, the integer overflow is avoided.

A patch for CVE-2018-XXXX is available.

RECOMMENDATIONS ---------------

We suggest you take one of the following actions immediately, in order of preference:

A - Upgrade curl to version 7.61.1

B - Apply the patch to your version and rebuild

C - Put length restrictions on the password you can pass to libcurl

TIME LINE ---------

It was publicly reported to the curl project on July 18, 2018. We contacted distros@openwall on August 27.

curl 7.61.1 was released on September 5 2018, coordinated with the publication of this advisory.

CREDITS -------

Reported by Zhaoyang Wu. Patch by Daniel Stenberg.

Red Hat

Affected Software

20 affected componentsFixes available
redhat/curl<0:7.29.0-51.el7_6.3
0:7.29.0-51.el7_6.3
redhat/httpd24-curl<0:7.61.1-1.el6
0:7.61.1-1.el6
redhat/httpd24-httpd<0:2.4.34-7.el6
0:2.4.34-7.el6
redhat/httpd24-nghttp2<0:1.7.1-7.el6
0:1.7.1-7.el6
redhat/httpd24-curl<0:7.61.1-1.el7
0:7.61.1-1.el7
redhat/httpd24-httpd<0:2.4.34-7.el7
0:2.4.34-7.el7
redhat/httpd24-nghttp2<0:1.7.1-7.el7
0:1.7.1-7.el7
redhat/curl<7.61.1
7.61.1
haxx libcurl<7.61.1
Canonical Ubuntu Linux=12.04
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Debian Debian Linux=9.0
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=7.4
redhat Enterprise Linux=7.5
redhat Enterprise Linux=7.6
debian/curl
7.74.0-1.3+deb11u137.74.0-1.3+deb11u167.88.1-10+deb12u147.88.1-10+deb12u58.14.1-2+deb13u28.19.0-38.20.0~rc2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/curl to a version that resolves this vulnerability.

    Fixed in 0:7.29.0-51.el7_6.3
  2. Upgrade

    Upgrade redhat/httpd24-curl to a version that resolves this vulnerability.

    Fixed in 0:7.61.1-1.el6
  3. Upgrade

    Upgrade redhat/httpd24-httpd to a version that resolves this vulnerability.

    Fixed in 0:2.4.34-7.el6
  4. Upgrade

    Upgrade redhat/httpd24-nghttp2 to a version that resolves this vulnerability.

    Fixed in 0:1.7.1-7.el6
  5. Upgrade

    Upgrade redhat/httpd24-curl to a version that resolves this vulnerability.

    Fixed in 0:7.61.1-1.el7
  6. Upgrade

    Upgrade redhat/httpd24-httpd to a version that resolves this vulnerability.

    Fixed in 0:2.4.34-7.el7
  7. Upgrade

    Upgrade redhat/httpd24-nghttp2 to a version that resolves this vulnerability.

    Fixed in 0:1.7.1-7.el7
  8. Upgrade

    Upgrade debian/curl to a version that resolves this vulnerability.

    Fixed in 7.74.0-1.3+deb11u13Fixed in 7.74.0-1.3+deb11u16Fixed in 7.88.1-10+deb12u14Fixed in 7.88.1-10+deb12u5Fixed in 8.14.1-2+deb13u2Fixed in 8.19.0-3Fixed in 8.20.0~rc2-1
  9. Upgrade

    Upgrade redhat/curl to a version that resolves this vulnerability.

    Fixed in 7.61.1
  10. Upgrade

    Upgrade libcurl to a version that resolves this vulnerability.

    Fixed in 7.61.1
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch CVE-2018-bf5f
  12. Configuration

    Put length restrictions on the password you can pass to libcurl (this issue occurs when the password length exceeds 2GB / 2^31 bytes on 32-bit systems).

    libcurl (NTLM authentication) password length restriction = <= 2GB (2^31 bytes)

Event History

Aug 27, 2018
Data Sourced
via Red Hat·07:40 PM
DescriptionSeverityAffected Software
Sep 5, 2018
CVE Published
12:00 AM
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:29 PM
DescriptionSeverityWeaknessAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·10:51 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·05:08 PM
RemedyDescriptionSeverityAffected Software
Apr 15, 2026
Data Sourced
via Debian·09:20 PM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2018-14618?

CVE-2018-14618 is a vulnerability in the NTLM authentication code of curl before version 7.61.1.

2

What is the severity of CVE-2018-14618?

CVE-2018-14618 has a severity value of 9.8, which is classified as critical.

3

How does CVE-2018-14618 affect curl?

CVE-2018-14618 affects curl versions before 7.61.1, and it is specifically related to a buffer overrun in the NTLM authentication code.

4

How can I fix CVE-2018-14618?

To fix CVE-2018-14618, you need to update curl to version 7.61.1 or later.

5

Where can I find more information about CVE-2018-14618?

You can find more information about CVE-2018-14618 on the official curl website and the Red Hat security page.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203