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

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 1% of CVEs (2026-12-01)
- Published: 2025-11-12T21:32:45.663Z
- Modified: 2026-10-19T13:10:00.110Z
- Also known as: PYSEC-2025-112, GHSA-vmp8-hg63-v2hp
- Weaknesses: CWE-327
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- duckdb duckdb: >= 1.4.0, < 1.4.2; from 1.4.0 before 1.4.2
- duckdb (PyPI): from 1.4.0 before 1.4.2

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/duckdb/duckdb/security/advisories/GHSA-vmp8-hg63-v2hp> (advisory, vendor-advisory)
- <https://github.com/duckdb/duckdb/pull/17275> (fix, patch)
- <https://duckdb.org/2025/09/16/announcing-duckdb-140.html> (advisory, release-notes)
- <https://github.com/duckdb/duckdb/blob/029a5b87ff5b1cd22f7f9717d48cd8830d00807c/src/common/random_engine.cpp#L20> (product, web)

## Sources

- CVE List: [CVE-2025-64429](https://www.cve.org/CVERecord?id=CVE-2025-64429), CVE Terms of Use, modified 2025-11-13
- NVD: [CVE-2025-64429](https://nvd.nist.gov/vuln/detail/CVE-2025-64429), Public domain, modified 2026-10-19
- PyPA Advisory Database: [PYSEC-2025-112](https://osv.dev/vulnerability/PYSEC-2025-112), CC-BY-4.0, modified 2026-05-20

---

Page: https://cve.day/CVE-2025-64429 · Whole record: https://cve.day/CVE-2025-64429.json · Rebuilt by cve.day 2026-11-25T22:59:07.604Z
