{"id":"CVE-2024-26130","published":"2024-02-21T16:28:18Z","modified":"2024-08-14T20:01:52Z","title":"cryptography NULL pointer deference with pkcs12.serialize_key_and_certificates when called with a non-matching…","vendor":"pyca","product":"cryptography","tier":"tail","description":{"text":"cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Starting in version 38.0.0 and prior to version 42.0.4, if `pkcs12.serialize_key_and_certificates` is called with both a certificate whose public key did not match the provided private key and an `encryption_algorithm` with `hmac_hash` set (via `PrivateFormat.PKCS12.encryption_builder().hmac_hash(...)`, then a NULL pointer dereference would occur, crashing the Python process. This has been resolved in version 42.0.4, the first version in which a `ValueError` is properly raised.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00831,"percentile":0.57545,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pyca/cryptography/pull/10423","tags":["x_refsource_MISC"]},{"url":"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55","tags":["x_refsource_MISC"]}],"priority":{"score":16.8,"factors":[{"name":"EPSS percentile","points":11.51},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"pyca","affectedVersions":[{"vendor":"pyca","product":"cryptography","versions":[">= 38.0.0, < 42.0.4"]}],"affected":[{"ecosystem":"PyPI","package":"cryptography","vulnerableRanges":[">=38.0.0, <42.0.4"],"patched":["42.0.4"],"from":["GHSA-6vqw-3v5j-54x4","PYSEC-2024-225"],"provenance":"source"}],"euvd":{"id":"EUVD-2024-0031","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pyca-cryptography-cve-2020-36242","parents":[{"from":"CVE-2023-49083","to":"CVE-2024-26130","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/cryptography/hazmat/backends/openssl/backend.py"],"commits":["https://github.com/pyca/cryptography/commit/f09c261ca10a31fe41b1262306db7f8f1da0e48a","https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-49083","published":"2023-11-29","fixed":"41.0.6","kev":false},{"cve":"CVE-2023-50782","published":"2024-02-05","fixed":"42.0.0","kev":false},{"cve":"CVE-2024-0727","published":"2024-01-26","fixed":"42.0.2","kev":false,"link":{"from":"CVE-2024-0727","to":"CVE-2024-26130","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:cryptography","fromFixed":"42.0.2","toFixed":"42.0.4","daysApart":26},{"kind":"similar","provenance":"machine","score":0.22,"basis":"same package + description similarity"}]}},{"cve":"CVE-2024-26130","published":"2024-02-21","fixed":"42.0.4","kev":false},{"cve":"CVE-2024-12797","published":"2025-02-11","fixed":"44.0.1","kev":false},{"cve":"CVE-2026-26007","published":"2026-02-10","fixed":"46.0.5","kev":false},{"cve":"CVE-2026-34073","published":"2026-03-31","fixed":"46.0.6","kev":false}],"package":"PyPI:cryptography"}}