---
id: CVE-2026-104267
title: >-
  Botan: scrypt V-buffer heap overflow on 32-bit from constructor-accepted
  parameters
summary: >-
  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…
severity: medium
cvss: 4.1
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-787
vendor: randombit
product: botan
affected:
  - 'botan >= 2.7.0, < 3.13.0'
published: '2026-11-06'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T21:25:42.417Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-104267'
references:
  - url: 'https://github.com/randombit/botan/security/advisories/GHSA-36rp-hhp4-wh83'
    label: 'https://github.com/randombit/botan/security/advisories/GHSA-36rp-hhp4-wh83'
  - url: 'https://github.com/randombit/botan/pull/5629'
    label: 'https://github.com/randombit/botan/pull/5629'
  - url: >-
      https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78
    label: >-
      https://github.com/randombit/botan/commit/459acdeba242dacc11ad8225e7d3e28203ce4f78
tags:
  - cve.org
ingestedAt: '2026-11-06T22:04:56.317Z'
epss: 0.00113
epssPercentile: 0.01429
---

## Overview

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.

## Affected

- `botan >= 2.7.0, < 3.13.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
