FlawAtlas
Search the atlas
CVE-2018-16839 Low

SASL password overflow via integer overflow

libcurl contains a buffer overrun in the SASL authentication code. The internal function `Curl_auth_create_plain_message` fails to correctly verify that the passed in lengths for name and password are not too long, then calculates a buffer size to allocate. On systems with a 32-bit `size_t`, the math to calculate the buffer size triggers an integer overflow when the username length exceeds 1GB and the password name length is close to 2GB in size. This integer overflow usually causes a tiny buffer to actually get allocated instead of the intended huge one, making the use of that buffer end up in a heap buffer overflow. (This bug is similar to [CVE-2018-14618](https://curl.se/docs/CVE-2018-14618.html).)

Exploit probability 5.8%
Published October 31, 2018
Required by Not available
Last source change May 27, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

41 explicit affected versions

Unknown Unknown

84 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2018-16839

Curl versions 7.33.0 through 7.61.1 are vulnerable to a buffer overrun in the SASL authentication code that may lead to denial of service.

View original source
Open Source Vulnerabilities CURL-CVE-2018-16839

libcurl contains a buffer overrun in the SASL authentication code. The internal function `Curl_auth_create_plain_message` fails to correctly verify that the passed in lengths for name and password are not too long, then calculates a buffer size to allocate. On systems with a 32-bit `size_t`, the math to calculate the buffer size triggers an integer overflow when the username length exceeds 1GB and the password name length is close to 2GB in size. This integer overflow usually causes a tiny buffer to actually get allocated instead of the intended huge one, making the use of that buffer end up in a heap buffer overflow. (This bug is similar to [CVE-2018-14618](https://curl.se/docs/CVE-2018-14618.html).)

View original source

05 / REFERENCES

Further evidence