# CVE-2026-104267: Botan Scrypt integer overflow in memory calculation

Source: https://junglewise.ai/threats/cve-2026-104267-botan-is-a-c-cryptography-library-from-2-7-0-until-3-13-0-botan  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-06. Updated: 2026-11-06  
License: CC BY 4.0 with a link back

CVE-2026-104267 · Severity: info · Published 2026-11-06

Botan is a C++ cryptography library used for password hashing and encryption. On 32-bit platforms, Botan's Scrypt implementation fails to properly validate integer overflow when computing memory requirements, allowing an attacker who controls Scrypt parameters to cause a buffer overflow that crashes the application and denies service. Applications that decrypt attacker-supplied encrypted private keys are particularly vulnerable.

Technologies: [Botan Project Botan](https://junglewise.ai/threats/technologies/botan). Vendors: [Botan Project](https://junglewise.ai/threats/vendors/botan-project).

## Quick answers

**Is CVE-2026-104267 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-104267 being exploited in the wild.

**How severe is CVE-2026-104267?** Informational severity, published 6 November 2026.

**Which products and versions are affected?** Botan Project Botan 2.7.0 to 3.12.x.

**Is there a fix for CVE-2026-104267?** Yes: fixed in 3.13.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-104267 attacked?** It is attacked over the network or with local access.

**Am I affected by CVE-2026-104267?** Check whether you run Botan Project Botan at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.13.0

## Technical details

The vulnerability is an integer overflow in unchecked multiplication when calculating Scrypt memory allocation on 32-bit platforms; attacker-controlled Scrypt parameters wrap the allocation size, resulting in a heap buffer smaller than the algorithm requires, causing ~4 GB of output to be written past the buffer boundary. The issue affects systems with Scrypt enabled that accept arbitrary parameters from untrusted sources, including password key derivation with user-supplied encrypted keys. The fix in version 3.13.0 introduces memory bounds checking (2 GB for 32-bit, 8 GB elsewhere) and uses safe integer arithmetic (checked_mul/checked_add).

## Affected products

- Botan Project Botan 2.7.0 to 3.12.x

## Timeline

- 2026-11-06: disclosed
- 2026-05-30: patched: Fix merged in version 3.13.0

## References

- [https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78](https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78)
- [https://github.com/randombit/botan/pull/5629](https://github.com/randombit/botan/pull/5629)

## Related threats

- [Botan integer overflow in block cipher block size FFI](https://junglewise.ai/threats/cve-2026-118769-botan-is-a-c-cryptography-library-from-2-1-0-until-3-13-0-the)
- [Botan SSRF via HTTP redirect in OCSP client](https://junglewise.ai/threats/cve-2026-118766-botan-is-a-c-cryptography-library-prior-to-3-13-0-botan-s-online)
- [Botan TLS 1.3 client authentication bypass](https://junglewise.ai/threats/cve-2026-34582-botan-tls-1-3-client-authentication-bypass)
- [Botan certificate validation bypass in Certificate_Store](https://junglewise.ai/threats/cve-2026-34580-botan-certificate-validation-bypass-in-certificate-store)
