CVE-2025-64429 Details
Description
DuckDB is a SQL database management system. DuckDB implemented block-based encryption of DB on the filesystem starting with DuckDB 1.4.0. There are a few issues related to this implementation. The DuckDB can fall back to an insecure random number generator (pcg32) to generate cryptographic keys or IVs. When clearing keys from memory, the compiler may remove the memset() and leave sensitive data on the heap. By modifying the database header, an attacker could downgrade the encryption mode from GCM to CTR to bypass integrity checks. There may be a failure to check return value on call to OpenSSL `rand_bytes()`. An attacker could use public IVs to compromise the internal state of RNG and determine the randomly generated key used to encrypt temporary files, get access to cryptographic keys if they have access to process memory (e.g. through memory leak),circumvent GCM integrity checks, and/or influence the OpenSSL random number generator and DuckDB would not be able to detect a failure of the generator. Version 1.4.2 has disabled the insecure random number generator by no longer using the fallback to write to or create databases. Instead, DuckDB will now attempt to install and load the OpenSSL implementation in the `httpfs` extension. DuckDB now uses secure MbedTLS primitive to clear memory as recommended and requires explicit specification of ciphers without integrity checks like CTR on `ATTACH`. Additionally, DuckDB now checks the return code.
A vulnerability in DuckDB's block-based encryption implementation, introduced in version 1.4.0, can lead to the exposure of cryptographic keys and integrity checks bypass. The issue arises from the use of an insecure random number generator (pcg32) for generating cryptographic keys and initialization vectors (IVs), the potential for the compiler to optimize out memory-clearing operations, and the possibility of downgrading the encryption mode by modifying the database header. Additionally, DuckDB failed to check the return value of OpenSSL's rand_bytes() function, which could lead to predictable key generation. An attacker could exploit these weaknesses to access cryptographic keys from process memory, circumvent integrity checks, and influence the random number generator's state, causing deterministic key values.
Users can upgrade to DuckDB version 1.4.2, which addresses these vulnerabilities by disabling the use of the insecure random number generator, using secure methods to clear memory, requiring explicit cipher specifications without integrity checks for certain operations, and checking the return values of cryptographic function calls.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Nov 13, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-327 | Use of a Broken or Risky Cryptographic Algorithm | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| duckdb duckdb | >= 1.4.0, < 1.4.2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 25, 2025 | Initial Analysis | [email protected] |
| Nov 12, 2025 | New CVE Received | [email protected] |