curl / Docs / curl CVEs / Integer overflows in URL parser
Awarded 150 USD

CVE-2019-5435

Integer overflows in URL parser

Project curl Security Advisory, May 22 2019 - Permalink

VULNERABILITY

libcurl contains two integer overflows in the curl_url_set() function that if triggered, can lead to a too small buffer allocation and a subsequent heap buffer overflow.

The flaws only exist on 32 bit architectures and require excessive string input lengths.

INFO

There are two entry points to this issue, on 32 bit architectures.

By asking libcurl to parse a string, passing in a string longer than 2GB to this API: curl_url_set(uh, CURLUPART_URL, "string", 0); triggers the bug.

Asking libcurl to update a URL with a new string, and URL encoded it in the process, by passing in a string longer than 1.33GB to this API: curl_url_set(uh, CURLUPART_*, "string", CURLU_URLENCODE); triggers the bug.

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

CWE-131: Incorrect Calculation of Buffer Size

Severity: Low

AFFECTED VERSIONS

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

SOLUTION

RECOMMENDATIONS

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

A - Upgrade curl to version 7.65.0

B - Apply the patch to your version and rebuild

TIMELINE

The issue was reported to the curl project on April 24, 2019. The patch was communicated to the reporter on April 25, 2019. We contacted distros@openwall on May 15.

curl 7.65.0 was released on May 22 2019, coordinated with the publication of this advisory.

CREDITS

Thanks a lot!