ID CVE-2019-3822
Summary libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffer overflow. The function creating an outgoing NTLM type-3 header (`lib/vauth/ntlm.c:Curl_auth_create_ntlm_type3_message()`), generates the request HTTP header contents based on previously received data. The check that exists to prevent the local buffer from getting overflowed is implemented wrongly (using unsigned math) and as such it does not prevent the overflow from happening. This output data can grow larger than the local buffer if very large 'nt response' data is extracted from a previous NTLMv2 header provided by the malicious or broken HTTP server. Such a 'large value' needs to be around 1000 bytes or more. The actual payload data copied to the target buffer comes from the NTLMv2 type-2 response header.
References
Vulnerable Configurations
  • Haxx libcurl 7.36.0
    cpe:2.3:a:haxx:libcurl:7.36.0
  • Haxx libcurl 7.37.0
    cpe:2.3:a:haxx:libcurl:7.37.0
  • Haxx libcurl 7.37.1
    cpe:2.3:a:haxx:libcurl:7.37.1
  • Haxx libcurl 7.38.0
    cpe:2.3:a:haxx:libcurl:7.38.0
  • Haxx libcurl 7.39
    cpe:2.3:a:haxx:libcurl:7.39
  • Haxx libcurl 7.39.0
    cpe:2.3:a:haxx:libcurl:7.39.0
  • Haxx libcurl 7.40.0
    cpe:2.3:a:haxx:libcurl:7.40.0
  • Haxx libcurl 7.41.0
    cpe:2.3:a:haxx:libcurl:7.41.0
  • Haxx libcurl 7.42
    cpe:2.3:a:haxx:libcurl:7.42
  • Haxx libcurl 7.42.0
    cpe:2.3:a:haxx:libcurl:7.42.0
  • Haxx libcurl 7.42.1
    cpe:2.3:a:haxx:libcurl:7.42.1
  • Haxx libcurl 7.43.0
    cpe:2.3:a:haxx:libcurl:7.43.0
  • Haxx libcurl 7.44.0
    cpe:2.3:a:haxx:libcurl:7.44.0
  • Haxx libcurl 7.45.0
    cpe:2.3:a:haxx:libcurl:7.45.0
  • Haxx libcurl 7.46.0
    cpe:2.3:a:haxx:libcurl:7.46.0
  • Haxx libcurl 7.47.0
    cpe:2.3:a:haxx:libcurl:7.47.0
  • Haxx libcurl 7.47.1
    cpe:2.3:a:haxx:libcurl:7.47.1
  • Haxx libcurl 7.48.0
    cpe:2.3:a:haxx:libcurl:7.48.0
  • Haxx libcurl 7.49.0
    cpe:2.3:a:haxx:libcurl:7.49.0
  • Haxx libcurl 7.49.1
    cpe:2.3:a:haxx:libcurl:7.49.1
  • Haxx libcurl 7.50.0
    cpe:2.3:a:haxx:libcurl:7.50.0
  • Haxx libcurl 7.50.1
    cpe:2.3:a:haxx:libcurl:7.50.1
  • Haxx libcurl 7.50.2
    cpe:2.3:a:haxx:libcurl:7.50.2
  • Haxx libcurl 7.50.3
    cpe:2.3:a:haxx:libcurl:7.50.3
  • Haxx libcurl 7.51.0
    cpe:2.3:a:haxx:libcurl:7.51.0
  • Haxx libcurl 7.52.0
    cpe:2.3:a:haxx:libcurl:7.52.0
  • Haxx libcurl 7.52.1
    cpe:2.3:a:haxx:libcurl:7.52.1
  • Haxx libcurl 7.53.0
    cpe:2.3:a:haxx:libcurl:7.53.0
  • Haxx libcurl 7.53.1
    cpe:2.3:a:haxx:libcurl:7.53.1
  • Haxx libcurl 7.54.0
    cpe:2.3:a:haxx:libcurl:7.54.0
  • Haxx libcurl 7.54.1
    cpe:2.3:a:haxx:libcurl:7.54.1
  • Haxx libcurl 7.55.0
    cpe:2.3:a:haxx:libcurl:7.55.0
  • Haxx libcurl 7.55.1
    cpe:2.3:a:haxx:libcurl:7.55.1
  • Haxx libcurl 7.56.0
    cpe:2.3:a:haxx:libcurl:7.56.0
  • Haxx libcurl 7.56.1
    cpe:2.3:a:haxx:libcurl:7.56.1
  • Haxx libcurl 7.57.0
    cpe:2.3:a:haxx:libcurl:7.57.0
  • Haxx libcurl 7.58.0
    cpe:2.3:a:haxx:libcurl:7.58.0
  • Haxx libcurl 7.59.0
    cpe:2.3:a:haxx:libcurl:7.59.0
  • Haxx libcurl 7.60.0
    cpe:2.3:a:haxx:libcurl:7.60.0
  • Haxx libcurl 7.61.0
    cpe:2.3:a:haxx:libcurl:7.61.0
  • Haxx libcurl 7.61.1
    cpe:2.3:a:haxx:libcurl:7.61.1
  • Haxx libcurl 7.62.0
    cpe:2.3:a:haxx:libcurl:7.62.0
  • Haxx libcurl 7.63.0
    cpe:2.3:a:haxx:libcurl:7.63.0
  • Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)
    cpe:2.3:o:canonical:ubuntu_linux:16.04:-:-:-:lts
  • Canonical Ubuntu Linux 18.04 LTS Edition
    cpe:2.3:o:canonical:ubuntu_linux:18.04:-:-:-:lts
  • Canonical Ubuntu Linux 18.10
    cpe:2.3:o:canonical:ubuntu_linux:18.10
  • Debian Linux 9.0
    cpe:2.3:o:debian:debian_linux:9.0
CVSS
Base: 7.5
Impact:
Exploitability:
CWE CWE-119
CAPEC
  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
  • Overflow Binary Resource File
    An attack of this type exploits a buffer overflow vulnerability in the handling of binary resources. Binary resources may include music files like MP3, image files like JPEG files, and any other binary file. These attacks may pass unnoticed to the client machine through normal usage of files, such as a browser loading a seemingly innocent JPEG file. This can allow the attacker access to the execution stack and execute arbitrary code in the target process. This attack pattern is a variant of standard buffer overflow attacks using an unexpected vector (binary files) to wrap its attack and open up a new attack vector. The attacker is required to either directly serve the binary content to the victim, or place it in a locale like a MP3 sharing application, for the victim to download. The attacker then is notified upon the download or otherwise locates the vulnerability opened up by the buffer overflow.
  • Buffer Overflow via Symbolic Links
    This type of attack leverages the use of symbolic links to cause buffer overflows. An attacker can try to create or manipulate a symbolic link file such that its contents result in out of bounds data. When the target software processes the symbolic link file, it could potentially overflow internal buffers with insufficient bounds checking.
  • Overflow Variables and Tags
    This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The attacker crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.
  • Buffer Overflow via Parameter Expansion
    In this attack, the target software is given input that the attacker knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
  • Buffer Overflow in an API Call
    This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An attacker who has access to an API may try to embed malicious code in the API function call and exploit a buffer overflow vulnerability in the function's implementation. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
  • Buffer Overflow in Local Command-Line Utilities
    This attack targets command-line utilities available in a number of shells. An attacker can leverage a vulnerability found in a command-line utility to escalate privilege to root.
nessus via4
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2019-173.NASL
    description This update for curl fixes the following issues : Security issues fixed : - CVE-2019-3823: Fixed a heap out-of-bounds read in the code handling the end-of-response for SMTP (bsc#1123378). - CVE-2019-3822: Fixed a stack based buffer overflow in the function creating an outgoing NTLM type-3 message (bsc#1123377). - CVE-2018-16890: Fixed a heap buffer out-of-bounds read in the function handling incoming NTLM type-2 messages (bsc#1123371). This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-16
    modified 2019-02-15
    plugin id 122220
    published 2019-02-15
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=122220
    title openSUSE Security Update : curl (openSUSE-2019-173)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2019-0249-1.NASL
    description This update for curl fixes the following issues : Security issues fixed : CVE-2019-3823: Fixed a heap out-of-bounds read in the code handling the end-of-response for SMTP (bsc#1123378). CVE-2019-3822: Fixed a stack-based buffer overflow in the function creating an outgoing NTLM type-3 message (bsc#1123377). CVE-2018-16890: Fixed a heap buffer out-of-bounds read in the function handling incoming NTLM type-2 messages (bsc#1123371). Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-12
    modified 2019-02-11
    plugin id 121635
    published 2019-02-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121635
    title SUSE SLED12 / SLES12 Security Update : curl (SUSE-SU-2019:0249-1)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2019-0339-1.NASL
    description This update for curl fixes the following issues : Security issues fixed : CVE-2019-3822: Fixed a NTLMv2 type-3 header stack-based buffer overflow (bsc#1123377). CVE-2019-3823: Fixed an out-of-bounds read in the SMTP end-of-response (bsc#1123378). CVE-2018-16890: Fixed an out-of-bounds buffer read in NTLM type2 (bsc#1123371). CVE-2018-16842: Fixed an out-of-bounds read in tool_msgs.c (bsc#1113660). CVE-2018-16840: Fixed a use-after-free in handle close (bsc#1113029). CVE-2018-16839: Fixed an SASL password overflow caused by an integer overflow (bsc#1112758). Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-14
    modified 2019-02-13
    plugin id 122149
    published 2019-02-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=122149
    title SUSE SLED12 / SLES12 Security Update : curl (SUSE-SU-2019:0339-1)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2019-0248-1.NASL
    description This update for curl fixes the following issues : Security issues fixed : CVE-2019-3823: Fixed a heap out-of-bounds read in the code handling the end-of-response for SMTP (bsc#1123378). CVE-2019-3822: Fixed a stack-based buffer overflow in the function creating an outgoing NTLM type-3 message (bsc#1123377). CVE-2018-16890: Fixed a heap buffer out-of-bounds read in the function handling incoming NTLM type-2 messages (bsc#1123371). Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-12
    modified 2019-02-11
    plugin id 121618
    published 2019-02-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121618
    title SUSE SLED15 / SLES15 Security Update : curl (SUSE-SU-2019:0248-1)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-3882-1.NASL
    description Wenxiang Qian discovered that curl incorrectly handled certain NTLM authentication messages. A remote attacker could possibly use this issue to cause curl to crash, resulting in a denial of service. This issue only applied to Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 18.10. (CVE-2018-16890) Wenxiang Qian discovered that curl incorrectly handled certain NTLMv2 authentication messages. A remote attacker could use this issue to cause curl to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only applied to Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 18.10. (CVE-2019-3822) Brian Carpenter discovered that curl incorrectly handled certain SMTP responses. A remote attacker could possibly use this issue to cause curl to crash, resulting in a denial of service. (CVE-2019-3823). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-12
    modified 2019-02-11
    plugin id 121639
    published 2019-02-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121639
    title Ubuntu 14.04 LTS / 16.04 LTS / 18.04 LTS / 18.10 : curl vulnerabilities (USN-3882-1)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2019-174.NASL
    description This update for curl fixes the following issues : Security issues fixed : - CVE-2019-3823: Fixed a heap out-of-bounds read in the code handling the end-of-response for SMTP (bsc#1123378). - CVE-2019-3822: Fixed a stack based buffer overflow in the function creating an outgoing NTLM type-3 message (bsc#1123377). - CVE-2018-16890: Fixed a heap buffer out-of-bounds read in the function handling incoming NTLM type-2 messages (bsc#1123371). This update was imported from the SUSE:SLE-15:Update update project.
    last seen 2019-02-16
    modified 2019-02-15
    plugin id 122221
    published 2019-02-15
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=122221
    title openSUSE Security Update : curl (openSUSE-2019-174)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-4386.NASL
    description Multiple vulnerabilities were discovered in cURL, an URL transfer library. - CVE-2018-16890 Wenxiang Qian of Tencent Blade Team discovered that the function handling incoming NTLM type-2 messages does not validate incoming data correctly and is subject to an integer overflow vulnerability, which could lead to an out-of-bounds buffer read. - CVE-2019-3822 Wenxiang Qian of Tencent Blade Team discovered that the function creating an outgoing NTLM type-3 header is subject to an integer overflow vulnerability, which could lead to an out-of-bounds write. - CVE-2019-3823 Brian Carpenter of Geeknik Labs discovered that the code handling the end-of-response for SMTP is subject to an out-of-bounds heap read.
    last seen 2019-02-12
    modified 2019-02-11
    plugin id 121628
    published 2019-02-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121628
    title Debian DSA-4386-1 : curl - security update
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2019-43489941FF.NASL
    description - fix SMTP end-of-response out-of-bounds read (CVE-2019-3823) - fix NTLMv2 type-3 header stack-based buffer overflow (CVE-2019-3822) - fix NTLM type-2 out-of-bounds buffer read (CVE-2018-16890) Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-13
    modified 2019-02-12
    plugin id 122106
    published 2019-02-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=122106
    title Fedora 29 : curl (2019-43489941ff)
  • NASL family Slackware Local Security Checks
    NASL id SLACKWARE_SSA_2019-037-01.NASL
    description New curl packages are available for Slackware 14.0, 14.1, 14.2, and -current to fix security issues.
    last seen 2019-02-12
    modified 2019-02-11
    plugin id 121632
    published 2019-02-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121632
    title Slackware 14.0 / 14.1 / 14.2 / current : curl (SSA:2019-037-01)
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_714B033A2B0911E98BC3610FD6E6CD05.NASL
    description curl security problems : CVE-2018-16890: NTLM type-2 out-of-bounds buffer read libcurl contains a heap buffer out-of-bounds read flaw. The function handling incoming NTLM type-2 messages (lib/vauth/ntlm.c:ntlm_decode_type2_target) does not validate incoming data correctly and is subject to an integer overflow vulnerability. Using that overflow, a malicious or broken NTLM server could trick libcurl to accept a bad length + offset combination that would lead to a buffer read out-of-bounds. CVE-2019-3822: NTLMv2 type-3 header stack-based buffer overflow libcurl contains a stack based buffer overflow vulnerability. The function creating an outgoing NTLM type-3 header (lib/vauth/ntlm.c:Curl_auth_create_ntlm_type3_message()), generates the request HTTP header contents based on previously received data. The check that exists to prevent the local buffer from getting overflowed is implemented wrongly (using unsigned math) and as such it does not prevent the overflow from happening. This output data can grow larger than the local buffer if very large 'nt response' data is extracted from a previous NTLMv2 header provided by the malicious or broken HTTP server. Such a 'large value' needs to be around 1000 bytes or more. The actual payload data copied to the target buffer comes from the NTLMv2 type-2 response header. CVE-2019-3823: SMTP end-of-response out-of-bounds read libcurl contains a heap out-of-bounds read in the code handling the end-of-response for SMTP. If the buffer passed to smtp_endofresp() isn't NUL terminated and contains no character ending the parsed number, and len is set to 5, then the strtol() call reads beyond the allocated buffer. The read contents will not be returned to the caller.
    last seen 2019-02-12
    modified 2019-02-11
    plugin id 122042
    published 2019-02-08
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=122042
    title FreeBSD : curl -- multiple vulnerabilities (714b033a-2b09-11e9-8bc3-610fd6e6cd05)
refmap via4
bid 106950
confirm https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3822
debian DSA-4386
misc https://curl.haxx.se/docs/CVE-2019-3822.html
ubuntu USN-3882-1
Last major update 09-02-2019 - 06:29
Published 06-02-2019 - 15:29
Last modified 14-02-2019 - 15:12
Back to Top