CVE Database›Document archive›CVE-2026-118769

CVE-2026-118769

botan: Botan: Integer overflow when reporting block size in FFI can cause memory corruption

Loading…

Severity

Moderate

Red Hat Product Security

8.1

CVSS 3.1

Review impact separately from score.

Published · October 30, 2026

Updated · November 4, 2026

Description

A flaw was found in Botan. An attacker can exploit an unchecked integer truncation in the C programming interface by supplying untrusted algorithm parameters that specify a variable-block-size cipher. This flaw causes the application to allocate an undersized memory buffer, resulting in heap memory corruption during data processing that may lead to arbitrary code execution or a denial of service (DoS).

Statement

A flaw was found in Botan's C API function botan_block_cipher_block_size(). When an application utilizing the C FFI raw ECB mode accepts untrusted external algorithm parameter strings, an attacker can specify the variable-block-size Lion cipher to trigger an unchecked integer truncation from size_t to int. This causes the application to allocate an undersized buffer, resulting in heap memory corruption during subsequent block processing.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Sanitize and restrict external algorithm parameter inputs using an allowlist to reject the variable-length Lion cipher when invoking Botan's C FFI interface. Alternatively, configure the application to utilize the native C++ API or standard cipher modes such as CBC or CTR instead of raw ECB mode.

CVSS / CWE

CVSS 3.1 · 8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CWE-681 · Incorrect Conversion between Numeric Types