{"id":"UBUNTU-CVE-2024-26130","details":"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.","modified":"2026-01-30T00:34:24.116382Z","published":"2024-02-21T17:15:00Z","related":["USN-6673-1","USN-6673-3"],"upstream":["CVE-2024-26130"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-26130"},{"type":"REPORT","url":"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4"},{"type":"REPORT","url":"https://github.com/pyca/cryptography/pull/10423"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-6673-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2024-26130"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-6673-3"}],"affected":[{"package":{"name":"python-cryptography","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/python-cryptography@41.0.7-4ubuntu0.1?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"41.0.7-4ubuntu0.1"}]}],"versions":["38.0.4-4","38.0.4-4ubuntu1","41.0.7-3","41.0.7-4build2","41.0.7-4build3"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"python3-cryptography","binary_version":"41.0.7-4ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-26130.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}