{"id":"CVE-2026-118769","summary":"Botan: Integer overflow when reporting block size in FFI can cause memory corruption","details":"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.","aliases":["GHSA-c68p-822g-jfvr"],"modified":"2026-11-01T07:03:38.678958797Z","published":"2026-10-29T17:22:07.316Z","database_specific":{"cwe_ids":["CWE-125","CWE-681","CWE-787"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118769.json","cna_assigner":"GitHub_M"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118769.json"},{"type":"ADVISORY","url":"https://github.com/randombit/botan/security/advisories/GHSA-c68p-822g-jfvr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118769"},{"type":"FIX","url":"https://github.com/randombit/botan/commit/c6089ab7fab616517d56c447c93e13a5c57a0af3"},{"type":"FIX","url":"https://github.com/randombit/botan/pull/5805"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/randombit/botan","events":[{"introduced":"7bdffd52a96e08e9452d1985258376a3925a497b"},{"fixed":"2a81eef56c96c237e590c27f9a75e60317c9c700"},{"fixed":"c6089ab7fab616517d56c447c93e13a5c57a0af3"}],"database_specific":{"extracted_events":[{"strategy":"StringRangeExpression","range":[{"introduced":"2.1.0"},{"fixed":"3.13.0"}],"source":"AFFECTED_FIELD"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"c6089ab7fab616517d56c447c93e13a5c57a0af3"}]}]}}],"versions":["3.12.0","3.11.1","3.11.0","3.10.0","3.9.0","3.8.1","3.8.0","3.7.1","3.7.0","3.6.1","3.6.0","3.5.0","3.4.0","3.3.0","3.2.0","3.1.1","3.1.0","3.0.0","3.0.0-rc1","3.0.0-alpha1","3.0.0-alpha0","2.17.0","2.16.0","2.15.0","2.14.0","2.13.0","2.12.1","2.12.0","2.11.0","2.10.0","2.9.0","2.8.0","2.7.0","2.6.0","2.5.0","2.4.0","2.3.0","2.2.0","2.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-118769.json","vanir_signatures":[{"id":"CVE-2026-118769-598d3690","signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/c6089ab7fab616517d56c447c93e13a5c57a0af3","target":{"file":"src/lib/ffi/ffi_block.cpp","function":"botan_block_cipher_block_size"},"deprecated":false,"digest":{"function_hash":"121098210841112036724711608983247288195","length":152}},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/randombit/botan/commit/c6089ab7fab616517d56c447c93e13a5c57a0af3","target":{"file":"src/lib/ffi/ffi_block.cpp"},"deprecated":false,"digest":{"line_hashes":["16817359195568761475930056364199673911","183177655608760677177084223361957734984","30561609617599177742555264186201557616","242289958001562596520268082242514753560","253266267082474433763755065648220923609","300444249402921091170003749064887688038","59968064099950927089828815020344854655"],"threshold":0.9},"id":"CVE-2026-118769-cec8f676"}],"vanir_signatures_modified":"2026-11-01T07:03:38Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}