CVE-2026-104267

Botan: scrypt V-buffer heap overflow on 32-bit from constructor-accepted parameters

Published Nov 6, 2026 CVSS 4.0 · 4.1 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The Botan cryptography library suffers from a heap buffer overflow (CWE-787) in its Scrypt implementation on 32‑bit systems. The vulnerability arises when the library multiplies cost parameters without bounds checking, allowing an attacker‑controlled parameter set to wrap the calculated allocation size. This overflow causes the algorithm to write up to approximately four gigabytes of data past the allocated buffer, immediately crashing the process and resulting in a denial of service. The flaw does not enable arbitrary code execution in the documented cases, though the overwrite primitive could theoretically be exploited under more complex conditions.

Affected Systems

This flaw affects any use of Randombit Botan between versions 2.7.0 and 3.12.x (the 3.13.0 release contains the fix) on 32‑bit architectures. Systems that enable Scrypt and accept arbitrary parameters from untrusted sources—such as applications that decrypt attacker‑supplied encrypted private keys—are at risk. Any deployment that relies on the vulnerable Scrypt implementation for key derivation or password hashing is potentially impacted.

Risk and Exploitability

The CVSS score of 4.1 indicates a moderate severity focus on denial of service. EPSS data is not available, so the current exploitation probability cannot be quantified, and the vulnerability is not catalogued in CISA KEV. An attacker in practice would trigger the overflow by supplying malicious Scrypt parameters, which may be embedded in encrypted payloads processed by the application. Successful exploitation would crash the target process; while no code execution has been demonstrated, the buffer overwrite could theoretically lead to more severe compromise under specific conditions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Botan 3.13.0 or later to apply the fix for unchecked multiplication.
  • If an upgrade cannot be performed immediately, disable Scrypt or enforce strict limits on accepted parameters so that the cost values cannot trigger a wraparound.
  • Add runtime validation for any parameters derived from external input before allocating memory in the Scrypt routine, ensuring allocation size is within safe bounds.

Generated by OpenCVE AI on November 6, 2026 at 22:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Randombit
Randombit botan
Vendors & Products Randombit
Randombit botan
Type Values Removed Values Added
Description 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.
Title Botan: scrypt V-buffer heap overflow on 32-bit from constructor-accepted parameters
Weaknesses CWE-787
References
Metrics cvssV4_0

{'score': 4.1, 'vector': '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 11, 2026, 3:38 AM
Reserved
Oct 1, 2026, 7:04 PM
Status
Deferred
Published
Nov 6, 2026, 10:17 PM
Modified
Nov 12, 2026, 10:11 PM