---
id: "CVE-2026-118765"
kind: "vulnerability"
aliases: ["CVE-2026-118765"]
title: "Botan: empty RNG request leaves predictable output on some builds"
severity: "high"
cvss: 7.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["botan", "c++", "cryptography", "package"]
not_affected_if: ["no-rng-clear-call", "system-rng-build", "version-3.13.0-or-later", "version-below-3.7.0"]
published_at: "2026-10-29T17:18:07+00:00"
first_seen_at: "2026-10-29T17:26:17+00:00"
updated_at: "2026-10-29T17:27:55+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118765", "first_seen_at": "2026-10-29T17:26:17+00:00"}]
---

# Botan: empty RNG request leaves predictable output on some builds

Botan is a C++ cryptography library. From 3.7.0 to 3.13.0, calling AutoSeeded_RNG::clear() then randomize with an empty buffer can mark the generator seeded without real entropy, so later output can be predictable on builds without a system RNG.

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

## How to check

- Check the Botan version the application links against, for example with `botan version` or the package manager listing.
- Look for calls to `AutoSeeded_RNG::clear()` followed by `randomize` in the application code.
- Check whether the build defines BOTAN_HAS_SYSTEM_RNG.

## Fix

- Botan: `3.13.0`

## Timeline

- 2026-10-29T17:26:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118765

## From the sources

Botan is a C++ cryptography library. From 3.7.0 until 3.13.0, an application that calls AutoSeeded_RNG::clear() and then calls randomize with an empty output buffer while the generator is unseeded can cause AutoSeeded_RNG to mark itself seeded without consulting the configured entropy source. On builds without BOTAN_HAS_SYSTEM_RNG, the fallback uses only a clock value and process ID, so a later non-empty request can produce output from predictable state. This issue is fixed in version 3.13.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
