CVE-2026-118769
Received Received - Intake

Integer Overflow in Botan Library Block Size Handling

Vulnerability report for CVE-2026-118769, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-29

Last updated on: 2026-10-29

Assigner: GitHub, Inc.

Description

Botan is a C++ cryptography library. From 2.1.0 until 3.13.0, the Botan C API function botan_block_cipher_block_size converted a size_t block size to int without a bounds check. In an application that accepts external algorithm parameter strings and uses the FFI raw ECB mode, an attacker can select the variable-block-size Lion cipher so that the reported size is truncated, the caller allocates insufficient memory, and later block processing causes memory corruption. The C++ API and normally used C API modes such as CBC and CTR are unaffected. This issue is fixed in version 3.13.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-29
Last Modified
2026-10-29
Generated
2026-10-29
AI Q&A
2026-10-29
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
randombit botan >= 2.1.0, < 3.13.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-681 When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dangerous behaviors may occur.
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an integer overflow issue in Botan's C API function botan_block_cipher_block_size. It occurs when the function converts a size_t block size to an int without bounds checking. Attackers can exploit this by selecting the Lion cipher with a variable block size, causing the reported size to truncate. This leads to insufficient memory allocation and memory corruption during block processing. The issue only affects applications using the FFI interface for raw ECB mode with external algorithm parameters.

Detection Guidance

To detect this vulnerability, check if your application uses Botan's C API FFI interface with raw ECB mode and accepts external algorithm parameter strings. Inspect for use of the Lion cipher or variable-block-size ciphers. No specific commands are provided in the resources.

Impact Analysis

If you use Botan's C API (FFI) with raw ECB mode and accept external algorithm parameters, an attacker could exploit this to cause memory corruption. This might lead to crashes, data corruption, or arbitrary code execution in your application. The impact is limited to specific use cases involving variable block size ciphers like Lion.

Mitigation Strategies
  • Update Botan to version 3.13.0 or later to address the issue.
  • Restrict allowed block ciphers to fixed-size ones and reject any algorithm name containing Lion.
  • Avoid using raw ECB mode with external algorithm parameter strings in the C API FFI interface.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-118769. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart