CVE-2025-64429: DuckDB Encryption Crypto implementation is vulnerable

Published Nov 12, 2025
·
Updated

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 randbytes(). 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.

Affected Software

2 affected components
DuckDB DuckDB>=1.4.0
DuckDB DuckDB>=1.4.0<1.4.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade DuckDB to a version that resolves this vulnerability.

    Fixed in 1.4.2
  2. Configuration

    Explicitly specify the encryption cipher when using ATTACH, particularly when selecting ciphers without integrity checks such as CTR.

    DuckDB ATTACH encryption cipher = Explicitly specified; do not use integrity-free ciphers such as CTR implicitly

Event History

Nov 12, 2025
CVE Published
via MITRE·09:32 PM
Data Sourced
via MITRE·09:32 PM
DescriptionWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-64429?

CVE-2025-64429 has been rated as a medium severity vulnerability due to its potential impact on data security.

2

How do I fix CVE-2025-64429?

To fix CVE-2025-64429, upgrade to DuckDB version 1.4.1 or later, which addresses the random number generator issue.

3

What are the risks associated with CVE-2025-64429?

The risks associated with CVE-2025-64429 include the potential for insecure encryption if the system falls back to a weak random number generator.

4

Which versions of DuckDB are affected by CVE-2025-64429?

DuckDB versions 1.4.0 and later are affected by CVE-2025-64429.

5

Is CVE-2025-64429 related to data encryption?

Yes, CVE-2025-64429 specifically relates to vulnerabilities in block-based encryption of the DuckDB database.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203