A vulnerability has been identified in the OpenSSL cryptographic library (CVE-2026-121481), leading to Buffer overflow due to integer overflow when processing a large amount of data in the EVP_EncodeBlock() function, designed for encoding in the Base64 format. The fix has not yet been accepted into the OpenSSL codebase. The status of fixing the vulnerability in distributions can be assessed on these pages: Debian, Ubuntu, SUSE, RHEL, Gentoo, Arch, Fedora, FreeBSD.
The problem is caused by the fact that the EVP_EncodeBlock() function uses the int type when calculating the size of the resulting buffer based on the size of the input data (in base64 every 3 bytes in the input are encoded by 4 characters in the output), without checking for the possibility of integer overflow. Overflow occurs when transmitting more than 1.5 GB of input data and leads to the return of an incorrect value and the allocation of a buffer that is obviously smaller than necessary to store the result.
In the case of processing external data in EVP_EncodeBlock(), the exploitation of a vulnerability for remote code execution is not excluded, but how applicable the vulnerability is in real conditions is not yet clear, given the huge size of the data leading to the overflow. Among the attack scenarios, exploitation through scripts using the “openssl s_client” command with the “-proxy_pass” option is mentioned so far. For example, it is shown that when using GOST algorithms, OpenSSL does not limit the size of input passwords, which can be transmitted through an environment variable to carry out an attack.