All stories
Cybersecurity

Critical buffer overflow in OpenSSL rated CVSS 9.8

Critical buffer overflow in OpenSSL rated CVSS 9.8

A patch proposal has emerged for a buffer overflow affecting the EVP_EncodeBlock() function in OpenSSL. According to the report, the flaw, tracked as CVE-2026-121481, is rated 9.8 on the CVSS scale, putting it in the critical range. The proposed fix makes the function return -1 for NULL input or output buffers, negative lengths, and lengths whose encoded size does not fit in an int.

The debate centers on how the function should behave on errors. Some developers worry that existing third-party callers might cast the -1 return to size_t without checking it, and suggest returning 0 instead. The patch author argues that 0 can be a legitimate result for both EVP_EncodeBlock() and EVP_DecodeBlock(), so using -1 for errors is the more consistent choice.

According to the article, the approach also matches what wolfSSL's OpenSSL compatibility layer does. The proposal additionally suggests adding a similar guard to EVP_DecodeBlock() and fixing an incorrect length check in the base64encode() function in http_client.c. Tests are being added to cover the new behavior, and the -1 returns are being documented.

According to the report, exploiting the flaw from the command line is theoretically possible by passing a very large -proxy_pass value to openssl s_client, though the password must be supplied through an environment variable. Some commenters argue the reproducer is entirely synthetic and that assigning a CVE without evidence it happens in practice is not justified.