---
id: "CVE-2026-104267"
page: "https://infrastack.ai/live/CVE-2026-104267"
kind: "vulnerability"
aliases: ["CVE-2026-104267"]
title: "Botan: unchecked multiplication in Scrypt on 32-bit lets heap overflow"
severity: "medium"
cvss: 4.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["32-bit", "botan", "c++", "cryptography", "package"]
not_affected_if: ["64-bit-only", "scrypt-unused", "trusted-scrypt-parameters"]
published_at: "2026-11-06T22:17:50+00:00"
first_seen_at: "2026-11-06T22:44:32+00:00"
updated_at: "2026-11-06T22:44:55+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-104267", "first_seen_at": "2026-11-06T22:44:32+00:00"}]
exploit_sources: []
---

# Botan: unchecked multiplication in Scrypt on 32-bit lets heap overflow

Link for people: https://infrastack.ai/live/CVE-2026-104267 (this .md is for agents)

Botan's Scrypt code on 32-bit platforms miscalculates buffer size from attacker-chosen parameters, so a crafted parameter set writes about four gigabytes past a heap buffer. The likely result is a crash (denial of service); code execution is described as difficult but not ruled out.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the Botan version in use, for example with `botan version` or the lockfile or package manifest, and look for anything from `2.7.0` up to `3.12.x`.
- Check whether the application calls Scrypt and accepts Scrypt parameters from untrusted input, such as attacker-supplied encrypted private keys.
- Confirm the build targets 32-bit platforms, since the flaw is limited to them.

## Fix

- Botan `3.13.0`

## Timeline

- 2026-11-06T22:44:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-104267

## Documents

- [advisory] Vendor advisory: github.com https://github.com/randombit/botan/security/advisories/GHSA-36rp-hhp4-wh83
- [fix] Patch: github.com https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
