{"schema_version":"1.7.3","id":"GHSA-6vqw-3v5j-54x4","published":"2024-02-21T18:04:40Z","modified":"2026-06-10T17:14:15.191713428Z","aliases":["CVE-2024-26130","PYSEC-2024-225"],"related":["CGA-83rw-66j6-76m3"],"summary":"cryptography NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override","details":"If `pkcs12.serialize_key_and_certificates` is called with both:\n\n1. A certificate whose public key did not match the provided private key\n2. An `encryption_algorithm` with `hmac_hash` set (via `PrivateFormat.PKCS12.encryption_builder().hmac_hash(...)`\n\nThen a NULL pointer dereference would occur, crashing the Python process.\n\nThis has been resolved, and now a `ValueError` is properly raised.\n\nPatched in https://github.com/pyca/cryptography/pull/10423","affected":[{"package":{"name":"cryptography","ecosystem":"PyPI","purl":"pkg:pypi/cryptography"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"38.0.0"},{"fixed":"42.0.4"}]}],"versions":["38.0.0","38.0.1","38.0.2","38.0.3","38.0.4","39.0.0","39.0.1","39.0.2","40.0.0","40.0.1","40.0.2","41.0.0","41.0.1","41.0.2","41.0.3","41.0.4","41.0.5","41.0.6","41.0.7","42.0.0","42.0.1","42.0.2","42.0.3"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/02/GHSA-6vqw-3v5j-54x4/GHSA-6vqw-3v5j-54x4.json"}}],"references":[{"type":"WEB","url":"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26130"},{"type":"WEB","url":"https://github.com/pyca/cryptography/pull/10423"},{"type":"WEB","url":"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55"},{"type":"PACKAGE","url":"https://github.com/pyca/cryptography"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2024-225.yaml"}],"database_specific":{"cwe_ids":["CWE-476"],"github_reviewed":true,"github_reviewed_at":"2024-02-21T18:04:40Z","nvd_published_at":"2024-02-21T17:15:09Z","severity":"HIGH"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}