{"id":"CVE-2026-104267","summary":"Botan: scrypt V-buffer heap overflow on 32-bit from constructor-accepted parameters","details":"Botan is a C++ cryptography library. From 2.7.0 until 3.13.0, Botan's Scrypt implementation on 32-bit platforms computes required memory with unchecked multiplication, allowing attacker-controlled Scrypt parameters to wrap the allocation size and create a buffer smaller than the algorithm subsequently writes. The issue affects systems that enable Scrypt and accept arbitrary parameters from a hostile source, including applications that decrypt attacker-supplied encrypted private keys. A triggering parameter set can cause approximately four gigabytes of Scrypt output to be written past the allocated heap buffer, immediately crashing the process and causing denial of service. Arbitrary code execution is not demonstrated and appears difficult, but cannot be excluded from the overwrite primitive. This issue is fixed in version 3.13.0.","aliases":["GHSA-36rp-hhp4-wh83"],"modified":"2026-11-14T07:06:37.423349107Z","published":"2026-11-06T21:25:42.417Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/104xxx/CVE-2026-104267.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-787"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/104xxx/CVE-2026-104267.json"},{"type":"ADVISORY","url":"https://github.com/randombit/botan/security/advisories/GHSA-36rp-hhp4-wh83"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-104267"},{"type":"FIX","url":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78"},{"type":"FIX","url":"https://github.com/randombit/botan/pull/5629"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/randombit/botan","events":[{"introduced":"5874000d42c338ec95a7ff24cdc0c64e70f967b5"},{"fixed":"2a81eef56c96c237e590c27f9a75e60317c9c700"},{"fixed":"459acdeba242dacc11ad8225e7d3e28203ce4f78"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"2.7.0"},{"fixed":"3.13.0"}],"source":"AFFECTED_FIELD","strategy":"StringRangeExpression"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"459acdeba242dacc11ad8225e7d3e28203ce4f78"}]}]}}],"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"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-104267.json","vanir_signatures":[{"signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"file":"src/lib/pbkdf/argon2/argon2.cpp","function":"Argon2::argon2"},"deprecated":false,"digest":{"function_hash":"198002665843426869612728898191399520675","length":1264},"id":"CVE-2026-104267-029a9a56"},{"deprecated":false,"digest":{"function_hash":"206123733013298323840518303715793392189","length":103},"id":"CVE-2026-104267-05f034de","signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"function":"scrypt_memory_usage","file":"src/lib/pbkdf/scrypt/scrypt.cpp"}},{"signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"file":"src/lib/pbkdf/argon2/argon2pwhash.cpp","function":"Argon2_Family::tune_params"},"deprecated":false,"digest":{"function_hash":"261698631006760930884911436494147312039","length":956},"id":"CVE-2026-104267-3d06ca7d","signature_type":"Function"},{"digest":{"function_hash":"131989743455082926435368534270377059157","length":487},"id":"CVE-2026-104267-445bab19","signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"function":"Scrypt::Scrypt","file":"src/lib/pbkdf/scrypt/scrypt.cpp"},"deprecated":false},{"source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"file":"src/lib/pbkdf/argon2/argon2pwhash.cpp"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["309925237680594476710920965106965619956","57138740261383159190918528715304589830","168285214526825559490696645766306048212","131763484670718386742834529816552856070","289871921958944122236609490949189726425","319009737004392720783877155344196635753","11657556980952326700102354089338825395","72554670517519468698570141426386487242","19739139539039828045987038441129339268","263323661375804977956293753899843367490","334249306291095281015697059115609361873","294923540042144165407384178679471370134","20972198758862138268382444266426350317","203031037035662920057444126567265706645","90427571122782524582806353120857028680","231358690339525271781766642688246126934","137036927372062760996468943509336740152","303429990596972086335376959792147664963","308796804977204674055518836608453623676","149570641021140331522238280161431896311","206235684086595245282390781558019366361","300534422460226903471683159299091820575","247177774914636447915235967223153117343","32631634527552983285941562033894783112","288015493945314943416751176909623018303","221531654081194802031002647720834359451","119456872680846273512813365485419354317"]},"id":"CVE-2026-104267-75f7e6b8","signature_type":"Line","signature_version":"v1"},{"target":{"file":"src/lib/pbkdf/scrypt/scrypt.cpp"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["222545000502306358665739565301620024522","215281894603387762227946356170365581942","27575558717435023982723009186662062554","145187189061535986455015105470570005605","196979433141884893695308945027720169499","256685020596498935149694543354987530065","170589275401553194665154218492436484010","209113991335795080950874432045966877136","308744939311421989798420891240323216656","202495699233413810885692871185203301847","174995767343870855342129929981127717006","133250841413810710589488848065359651453","256074959101971244518075198987697162054","310457256496148529562609433104019465355","270818534561023976051060335717866188467","89124665102429729540497261142729828706","76256498502249800121374403591208811497","14847074880924219720895058544578006954","291365204446487412229484030897837821304","53992347056231849666847868188598097049","339357208510339538172198841356172205042","275689146890549874151826970588796830379","224924447989892129048535477495958229424","128852636140582990919429256408967740007","68003218088666971310252243239474959004","285524645201448356727577647600613150208","192844653106215130648429656725329698570","116171479593822659878787334214033153352","62544986717984215057266154195286403483","256120425367923713473269716287483250657","293638593145612846931944569083738167261"]},"id":"CVE-2026-104267-7b8b6bca","signature_type":"Line","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78"},{"id":"CVE-2026-104267-83e1598d","signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"file":"src/lib/pbkdf/scrypt/scrypt.cpp","function":"Scrypt_Family::tune_params"},"deprecated":false,"digest":{"length":920,"function_hash":"88740178654847179966404590540804444174"}},{"target":{"file":"src/lib/pbkdf/argon2/argon2pwhash.cpp","function":"Argon2::Argon2"},"deprecated":false,"digest":{"length":416,"function_hash":"212588666888125145335718416976834292926"},"id":"CVE-2026-104267-a7b530f9","signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78"},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"file":"src/lib/pbkdf/scrypt/scrypt.cpp","function":"Scrypt::total_memory_usage"},"deprecated":false,"digest":{"length":185,"function_hash":"266756731237703164338910995397398748377"},"id":"CVE-2026-104267-b9f9599b"},{"id":"CVE-2026-104267-cc25a5a8","signature_type":"Line","signature_version":"v1","source":"https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78","target":{"file":"src/lib/pbkdf/argon2/argon2.cpp"},"deprecated":false,"digest":{"line_hashes":["216975594872283693729653289298223781816","308965213601109320890519396002738688378","205466819442471033695306330680108107321","6195688326683338334875095664276228039"],"threshold":0.9}}],"vanir_signatures_modified":"2026-11-14T07:06:37Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}