# CVE-2026-118769 - Botan: Integer overflow when reporting block size in FFI can cause memory corruption

DevFeed: [CVE-2026-118769 - Botan: Integer overflow when reporting block size in FFI can cause memory corruption](<https://devfeed.tech/articles/cve-2026-118769-botan-integer-overflow-when-reporting-block-size-in-ffi-can-cause-memory-corruption-106782.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-118769>)

Author: CVEFEED.io; github.com

Published: 2026-10-29T18:17:29Z

Content type: news

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [api](<https://devfeed.tech/tags/api.md>), [block](<https://devfeed.tech/tags/block.md>), [botan](<https://devfeed.tech/tags/botan.md>), [botan-project](<https://devfeed.tech/tags/botan-project.md>), [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [cve-2026-118769](<https://devfeed.tech/tags/cve-2026-118769.md>), [ffi](<https://devfeed.tech/tags/ffi.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [integer-overflow](<https://devfeed.tech/tags/integer-overflow.md>), [library](<https://devfeed.tech/tags/library.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-corruption](<https://devfeed.tech/tags/memory-corruption.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [size](<https://devfeed.tech/tags/size.md>), [version](<https://devfeed.tech/tags/version.md>)

## AI overview

In Botan versions 2.1.0 through before 3.13.0, botan_block_cipher_block_size converted a size_t block size to int without checking bounds. If an application accepts external algorithm parameter strings and uses the FFI raw ECB mode, an attacker can select the variable-block-size Lion cipher; truncation can lead the caller to allocate too little memory, and later block processing can cause memory corruption. The C++ API and commonly used C API modes such as CBC and CTR are unaffected. The issue is fixed in Botan 3.13.0.

## Source excerpt

CVE ID :CVE-2026-118769 Published : Oct. 29, 2026, 6:17 p.m. | 2 hours, 12 minutes ago 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. Severity: 9.2 | CRITICAL Visit the link for more details, such as CVSS details, affected products, timeline, and more...