CVE-2019-3822 Memory corruption in curl

High 7.1 Published Updated

A stack-based buffer overflow in libcurl's NTLM authentication allows remote attackers to execute arbitrary code or cause denial of service via malicious server responses.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2019-3822?

CVE-2019-3822 is a high-severity memory corruption vulnerability in Canonical Ubuntu Linux, published on 6 Feb 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-787, CWE-121

Which versions are affected by CVE-2019-3822?

It affects 16 products.

Products include Canonical Ubuntu Linux, Debian Debian Linux, Haxx Libcurl, Netapp Active Iq Unified Manager, Netapp Clustered Data Ontap, Netapp Oncommand Insight and 10 more.

How do I fix CVE-2019-3822?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2019-3822 being exploited?

There is no known exploitation of CVE-2019-3822 in the wild and no public exploit code.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2019-3822, CLEANSTART-2026-IB97779, CURL-CVE-2019-3822, DEBIAN-CVE-2019-3822, GHSA-8wr2-mqj7-7vxp, UBUNTU-CVE-2019-3822.

Is CVE-2019-3822 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free