{"id":"CVE-2026-118769","kind":"vulnerability","aliases":["CVE-2026-118769"],"related":[],"title":"Botan C++ cryptography library: block size truncation enables memory corruption","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.","summary":"Botan's C API function botan_block_cipher_block_size converts a size_t to int without a bounds check, so a large Lion cipher block size is truncated. An attacker who can pick the cipher through external parameter strings in an app using raw ECB mode can cause the caller to under-allocate and corrupt memory.","severity":"critical","cvss":9.2,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["botan","c++","c-api","cryptography","package"],"not_affected_if":["c++-api-only","cbc-or-ctr-modes","no-external-cipher-selection"],"how_to_check":"- Check the Botan version in use, for example with `botan version` or the package manager lockfile.\n- Search your code for calls to the Botan C API (`botan_block_cipher_*`) using raw ECB mode.\n- Check whether cipher names from user or external input are passed straight to Botan.","fix":"- Upgrade Botan to `3.13.0`.","status":"open","published_at":"2026-10-29T18:17:29+00:00","first_seen_at":"2026-10-29T18:26:33+00:00","triaged_at":"2026-10-29T18:28:42+00:00","updated_at":"2026-10-29T18:28:42+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-29T18:28:42Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Botan to `3.13.0`.","reach":"unknown","title":"Botan C++ cryptography library: block size truncation enables memory corruption","impact":"high","summary":"Botan's C API function botan_block_cipher_block_size converts a size_t to int without a bounds check, so a large Lion cipher block size is truncated. An attacker who can pick the cipher through external parameter strings in an app using raw ECB mode can cause the caller to under-allocate and corrupt memory.","audience":"developers","category":"package","nicknames":[],"who_cares":["botan","c++","cryptography","c-api"],"confidence":0.7,"fix_status":"available","needs_auth":"unknown","worst_case":"memory corruption when attacker selects Lion cipher","analyst_note":"","how_to_check":"- Check the Botan version in use, for example with `botan version` or the package manager lockfile.\n- Search your code for calls to the Botan C API (`botan_block_cipher_*`) using raw ECB mode.\n- Check whether cipher names from user or external input are passed straight to Botan.","plain_action":"","needs_analyst":false,"not_affected_if":["c++-api-only","cbc-or-ctr-modes","no-external-cipher-selection"],"who_is_affected":"Only applications that use the Botan C API, specifically the FFI raw ECB mode, and that accept external algorithm parameter strings so an attacker can select the Lion cipher. The C++ API and normal C API modes such as CBC and CTR are not affected according to the description. Teams that use Botan only through the C++ API or standard modes can skip it.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000716,"input_tokens":4199,"output_tokens":593,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-118769':13A,16A '-2026':12A,15A '2.1.0':89C '3.13.0':91C,182C 'accept':118C 'algorithm':120C 'alloc':78B,150C 'api':21B,27B,95C,162C,167C 'app':66B 'applic':116C 'attack':54B,131C 'block':5A,30B,32B,49B,98C,100C,106C,137C,155C 'botan':1A,17B,24B,29B,82C,93C,97C 'bound':42B,112C 'c':2A,18B,20B,26B,85C,94C,161C,166C 'c-api':19B 'caller':74B,149C 'caus':72B,157C 'cbc':171C 'check':43B,113C 'cipher':31B,48B,59B,99C,140C 'convert':34B,102C 'corrupt':10A,80B,159C 'cryptographi':3A,22B,86C 'ctr':173C 'cve':11A,14A 'ecb':69B,128C 'enabl':8A 'extern':61B,119C 'ffi':126C 'fix':179C 'function':28B,96C 'insuffici':151C 'int':39B,109C 'issu':177C 'larg':46B 'later':154C 'librari':4A,87C 'lion':47B,139C 'memori':9A,81B,152C,158C 'mode':70B,129C,168C 'normal':164C 'packag':23B 'paramet':62B,121C 'pick':57B 'process':156C 'raw':68B,127C 'report':144C 'select':133C 'size':6A,33B,36B,50B,101C,104C,107C,138C,145C 'string':63B,122C 'truncat':7A,52B,147C 'unaffect':175C 'under-alloc':76B 'use':67B,124C,165C 'variabl':136C 'variable-block-s':135C 'version':181C 'without':40B,110C","nicknames":[],"mitigations":[],"who_affected":"Only applications that use the Botan C API, specifically the FFI raw ECB mode, and that accept external algorithm parameter strings so an attacker can select the Lion cipher. The C++ API and normal C API modes such as CBC and CTR are not affected according to the description. Teams that use Botan only through the C++ API or standard modes can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-29T18:17:29+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118769","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118769","severity":null,"published_at":"2026-10-29T18:17:29+00:00","modified_at":"2026-10-29T18:17:29+00:00","first_seen_at":"2026-10-29T18:26:33+00:00","fetched_at":"2026-10-29T18:26:33+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}